Pages: 12

  2008-02-13 09:40:18

dracoknight09
» FTalkAddict
FTalk Level: zero
302
0
1969-12-31

Codes Derived From: :arrow: [b]Dynamic Drive[/b] Credits: [b] :arrow: Me.[/b] Acknowledgment [i]"I belong to a league of super human loonies the [b]The DiaShak DuchShiKnights2008[/b]. Lurve Yah Guy

Codes Derived From: :arrow: [b]Dynamic Drive[/b] Credits: [b] :arrow: Me.[/b] Acknowledgment [i]"I belong to a league of super human loonies the [b]The DiaShak DuchShiKnights2008[/b]. Lurve Yah Guys!"[/i] Ever wanted to rid yourself of pressing Ctrl+F whenever you search a word in your profile? here's the solution. tada! this will make profile searching possible. :cool: :thumbsup: [b]Advance Happy Valentine's Day Pipz! [/b] :kiss: there are 2 main function in this code. :arrow: Search :arrow: Disable Enter ([i]a bugfix i added to the original code[/i]) ok then.. as usual, paste this [b]outside the loader[/b] :exclaim: [quote]//Site Search var TRange = null; var dupeRange = null; var TestRange = null; var win = null; function handleEnter (field, event) { var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode; if (keyCode == 13) { var i; for (i = 0; i < field.form.elements.length; i++) if (field == field.form.elements[i]) break; i = (i + 1) % field.form.elements.length; field.form.elements[i].focus(); return false; } else return true; } var nom = navigator.appName.toLowerCase(); var agt = navigator.userAgent.toLowerCase(); var is_major = parseInt(navigator.appVersion); var is_minor = parseFloat(navigator.appVersion); var is_ie = (agt.indexOf("msie") != -1); var is_ie4up = (is_ie && (is_major >= 4)); var is_not_moz = (agt.indexOf('netscape')!=-1) var is_nav = (nom.indexOf('netscape')!=-1); var is_nav4 = (is_nav && (is_major == 4)); var is_mac = (agt.indexOf("mac")!=-1); var is_gecko = (agt.indexOf('gecko') != -1); var is_opera = (agt.indexOf("opera") != -1); var is_rev=0 if (is_gecko) { temp = agt.split("rv:") is_rev = parseFloat(temp[1]) } var frametosearch = self; function search(whichform, whichframe) { if (is_ie4up && is_mac) return; if (is_gecko && (is_rev <1)) return; if (is_opera) return; if(whichform.findthis.value!=null && whichform.findthis.value!='') { str = whichform.findthis.value; win = whichframe; var frameval=false; if(win!=self) { frameval=true; win = parent.frames[whichframe]; } } else return; var strFound; if(is_nav4 && (is_minor < 5)) { strFound=win.find(str); } if (is_gecko && (is_rev >= 1)) { if(frameval!=false) win.focus(); strFound=win.find(str, false, false, true, false, frameval, false); if (is_not_moz) whichform.findthis.focus(); } if (is_ie4up) { if (TRange!=null) { TestRange=win.document.body.createTextRange(); if (dupeRange.inRange(TestRange)) { TRange.collapse(false); strFound=TRange.findText(str); if (strFound) { win.document.body.scrollTop = win.document.body.scrollTop + TRange.offsetTop; TRange.select(); } } else { TRange=win.document.body.createTextRange(); TRange.collapse(false); strFound=TRange.findText(str); if (strFound) { win.document.body.scrollTop = TRange.offsetTop; TRange.select(); } } } if (TRange==null || strFound==0) { TRange=win.document.body.createTextRange(); dupeRange = TRange.duplicate(); strFound=TRange.findText(str); if (strFound) { win.document.body.scrollTop = TRange.offsetTop; TRange.select(); } } } if (!strFound) alert ("You Have Reached The End Of The Document") }[/quote] then next paste this inside a html replacement or addbox function. [quote]<br><center><b>Search Page</b><br><form name=\"form1\" onkeypress=\"return handleEnter(this, event)\" onSubmit=\"search(document.form1, frametosearch); return false\"><input type=\"image\" src=\"[b]http://i132.photobucket.com/albums/q21/bate8473/magnify.gif[/b]\" /> <input type=\"text\" name=\"findthis\" size=\"15\" title=\"Press 'ALT s' after clicking submit to repeatedly search page\" onkeypress=\"return handleEnter(this, event)\" value=\"[b]Your Keyword[/b]\"> <input type=\"submit\" value=\"[b]Search[/b]\" ACCESSKEY=\"s\" onkeypress=\"return handleEnter(this, event)\"></form></center>[/quote] you can use my style by pasting it inside the about me. ;] [quote]var dk9 = "<br><form name=\"form1\" onSubmit=\"search(document.form1, frametosearch); return false\" onkeypress=\"return handleEnter(this, event)\"><img src=\"[b]http://i132.photobucket.com/albums/q21/bate8473/magnify.gif[/b]\" /> <input type=\"text\" name=\"findthis\" size=\"15\" title=\"Press 'ALT s' after clicking submit to repeatedly search page\" onkeypress=\"return handleEnter(this, event)\" value=\"[b]Keyword Here[/b]\"> <input type=\"submit\" value=\"[b]Search[/b]\" ACCESSKEY=\"s\" onkeypress=\"return handleEnter(this, event)\"></form><br>"; document.getElementById('content_6').style.height='100%'; document.getElementById('content_6').style.overflowY='hidden'; document.getElementById('content_6').innerHTML = "<table width='100%'><tr><td align='center'>"+dk9+"</td></tr></table>";[/quote] paste the code above inside the [b]loader.[/b] ok? :eh: you dont need to edit anything if you dont want to. this is a cheap code. haha! copy paste! :wallbash: but a point of advice. i have marked some properties of the input values in bold letters. use those as reference ok?.. [b]HAPPY TWEAKIN' [/b] :paranoid: :thumbsup: dedicated to miss [b]Shy19[/b] :rose: weeeeh! :D preview.. i almost forgot! :lol: [url]http://profiles.friendster.com/56419498[/url]

Last edited by dracoknight09 (2008-02-13 10:20:35)

Pages: 12

Board footer

© 2024 F Talk

Current time is 21:40

[ 12 queries - 0.024 second ]
Privacy Policy