Search results for 'Web Searchers'. 1 post(s) found.

  1. 2007/08/31 Getting WebSearchers On Your Site
2007/08/31 08:20

Getting WebSearchers On Your Site


This code aims to allow the programmer to call a variety of Search Engines like Yahoo or Google by simply typing a phrase in the search box and selecting the Search Engine.
So in your HTML file, create any number of links and use the 'searchem' function to call a engine when a hyperlink corresponding to an engine is clicked. This calls the engine with the site and the text which is stored in the textbox named box (hence the line text=box.value).

You can add any number of engines. Note the link of a Search Engine, the next time you search on it. Everything except the text you wrote is relevant to this script!

Enjoy!


<script language="JavaScript1.2">
function searchem(engine)
{
    var link,text;
    text=box.value;
    if (engine==0)
        link="http://www.google.com/search?q="+text;
    if (engine==1)
        link="http://www.yahoo.com/bin/search?p="+text;
    if (engine==2)
        link="http://www.lycos.com/cgi-bin/pursuit?cat=lycos&query="+text;
    if (engine==3)
        link="http://infoseek.go.com/Titles?col=WW&qt="+text;
    if (engine==4)
        link="http://infoseek.go.com/Titles?col=WW&qt="+text;
    window.location.replace(link);
}
</script>

Trackback 3 Comment 0

Trackback : Cannot send a trackbact to this post.

  1. Subject different money making ideas

    Tracked from moneyideas 2010/01/28 22:54 delete

    moneyideas

  2. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 07:11 delete

    moneyideas

  3. Subject different money making ideas

    Tracked from moneyideas 2010/01/31 16:45 delete

    moneyideas