1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

html search box

Discussion in 'HTML & Website Design' started by lowboman, Sep 28, 2007.

  1. #1
    Hello I need the html code for a search box that will search for keyword and content in my site. Thanks
     
    lowboman, Sep 28, 2007 IP
  2. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <input type="text" /> is the HTML code for the box as requested

    To actually perform the search you need serverside setup such as .Net or PHP or plug into the Google API or equiv
     
    AstarothSolutions, Sep 29, 2007 IP
  3. Azemati

    Azemati Well-Known Member

    Messages:
    123
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    121
    #3
    you can put Google Seach box in your site. it is very easy.
     
    Azemati, Sep 29, 2007 IP
  4. longhornfreak

    longhornfreak Well-Known Member

    Messages:
    2,067
    Likes Received:
    95
    Best Answers:
    0
    Trophy Points:
    140
    #4
    longhornfreak, Sep 29, 2007 IP
  5. lowboman

    lowboman Banned

    Messages:
    399
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    ummmn I don't want it to search google I just wanted one for my site :(
     
    lowboman, Sep 29, 2007 IP
  6. bogs

    bogs Active Member

    Messages:
    2,142
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    80
    #6
    theres alot of free script of that...
     
    bogs, Sep 29, 2007 IP
  7. Professional Dude

    Professional Dude Prominent Member

    Messages:
    6,261
    Likes Received:
    430
    Best Answers:
    0
    Trophy Points:
    330
    #7
    i know what you are looking for :D

    Try FreeFind.Com

    and it works fine.. I am using it on my site also..

    It crawls your site whenever you want to update search results..kind of your own search engine,, ;)
     
    Professional Dude, Sep 29, 2007 IP
  8. Subliminal

    Subliminal Active Member

    Messages:
    322
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #8
    How about that?

    Copy/paste the following source code into a notepad and save it as an html file.

    Open it on explorer.

    Simple, easy to use "search my site" system using google and pure html

    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>
    
    <body>
    <!-- SiteSearch Google -->
    <form method="get" action="http://www.google.com/custom" target="_top">
    <table border="0" bgcolor="#ffffff">
    <tr><td nowrap="nowrap" valign="top" align="left" height="32"></td>
    <td nowrap="nowrap">
    <input type="hidden" name="domains" value="mysite.com"></input>
    <label for="sbi" style="display: none">Enter your search terms</label>
    <input type="text" name="q" size="31" maxlength="255" value="" id="sbi"></input>
    <label for="sbb" style="display: none">Submit search form</label>
    <input type="submit" name="sa" value="Search" id="sbb"></input>
    </td></tr>
    <tr>
    <td>&nbsp;</td>
    <td nowrap="nowrap">
    <table>
    <tr>
    <td>
    <td>
    <input type="hidden" name="sitesearch" value="mysite.com" id="ss1"></input>
    </tr>
    </table>
    <input type="hidden" name="forid" value="1"></input>
    <input type="hidden" name="ie" value="UTF-8"></input>
    <input type="hidden" name="oe" value="UTF-8"></input>
    <input type="hidden" name="hl" value="en"></input>
    </td></tr></table>
    </form>
    <!-- SiteSearch Google -->
    </body>
    </html>
    
    
    Code (markup):
     
    Subliminal, Sep 30, 2007 IP
  9. lowboman

    lowboman Banned

    Messages:
    399
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Thank you very much....
     
    lowboman, Sep 30, 2007 IP
  10. seospecialistIndia

    seospecialistIndia Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    <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>


    Try this it will help you :cool:
     
    seospecialistIndia, Apr 4, 2012 IP