FREE CODE Thursday, 03.28.2024, 9:19 PM
Main | Registration | Login Welcome Guest | RSS
[ New messages · Members · Forum rules · Search · RSS ]
۞Forum Statistics۞
NEW TOPPIV
HOT TOPPIC
TOP MEMBERS
NEW MEMBERS
  • check code here Have(0) reviews faxuhi
  • Keywords meta Tags Have(0) reviews faxuhi
  • text box Have(0) reviews faxuhi
  • Page description Have(0) reviews faxuhi
  • marquee Have(0) reviews faxuhi
  • print your page Have(0) reviews faxuhi
  • choose your country Have(0) reviews faxuhi
  • check all - unchek all Have(0) reviews faxuhi
  • shadow text Have(0) reviews faxuhi
  • Beautiful text two Have(0) reviews faxuhi
  • Nice menu with java script <p1> Have(2) reviews faxuhi
  • Mouse Clock Have(1) reviews faxuhi
  • check code here Have(0) reviews faxuhi
  • Keywords meta Tags Have(0) reviews faxuhi
  • text box Have(0) reviews faxuhi
  • Page description Have(0) reviews faxuhi
  • marquee Have(0) reviews faxuhi
  • print your page Have(0) reviews faxuhi
  • choose your country Have(0) reviews faxuhi
  • check all - unchek all Have(0) reviews faxuhi
  • faxuhi[189]Bài
  • mcsnagger0022[0]Bài
  • thinknoodles[0]Bài
  • karaganis888[0]Bài
  • faxuhi [189]Bài
  • mcsnagger0022 [0]Bài
  • thinknoodles [0]Bài
  • karaganis888 [0]Bài
    • Page 1 of 1
    • 1
    Forum » Web Javascript » Search box ( Search engine ) for your page » Javascript Code: Search box ( Search engine ) for your page
    Javascript Code: Search box ( Search engine ) for your page
    faxuhiDate: Sunday, 07.24.2011, 10:54 AM | Message # 1
    Colonel
    Group: Administrators
    Messages: 189
    Reputation: 0
    Status: Offline
    Code
    <!-- this script got from www.javascriptfreecode.com coded by: Krishna Eydat-->
    <SCRIPT language=JavaScript>
    var NS4 = (document.layers);     
    var IE4 = (document.all);
    var win = window;     
    var n   = 0;
    function findInPage(str) {
       var txt, i, found;
       if (str == "")
         return false;
       if (NS4) {
         if (!win.find(str))
           while(win.find(str, false, true))
             n++;
         else
           n++;
         if (n == 0)
           alert("Not found.");
       }
       if (IE4) {
         txt = win.document.body.createTextRange();
         for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
           txt.moveStart("character", 1);
           txt.moveEnd("textedit");
         }
         if (found) {
           txt.moveStart("character", -1);
           txt.findText(str);
           txt.select();
           txt.scrollIntoView();
           n++;
         }
         else {
           if (n > 0) {
             n = 0;
             findInPage(str);
           }
           else
             alert("Sorry, we couldn't find.Try again");
        }
       }
       return false;
    }
    </SCRIPT>

    <FORM name=search onsubmit="return findInPage(this.string.value);">
    <P align=center><FONT size=3>
    <INPUT  
    style="BORDER-RIGHT: #666666 1px solid; BORDER-TOP: #666666 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #666666 1px solid; BORDER-BOTTOM: #666666 1px solid"  
    onchange="n = 0;" size=16 name=string></FONT><BR><INPUT style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #ffffff 1px solid; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #aaaaaa" type=submit value=Search in page ><center><font size=2pt;><font family=Times New Roman;><b>

    <font face="Tahoma"><a target="_blank" href="http://www.javascriptfreecode.com/"><span style="font-size: 8pt; text-decoration: none">JavaScript Free Code</span></a></font>

    <BR>  
    </P></FORM></DIV><BR><!-- /Search-->
     
    Forum » Web Javascript » Search box ( Search engine ) for your page » Javascript Code: Search box ( Search engine ) for your page
    • Page 1 of 1
    • 1
    Search:

    Copyright MyCorp © 2024 Website builderuCoz