Search results for 'Web Searchers'. 1 post(s) found.
- 2007/08/31 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>
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>
Another posts included in "HTML, Javascript"
| Javascript Mouse Event Handler Example (0) | 2007/08/31 |
| Select And Deselect All Checkboxes By Javascript (0) | 2007/08/31 |
| Confirm The Link Clicked (0) | 2007/09/03 |
| Hiding HTML on the browser (0) | 2007/08/31 |
| How to get date time in Javascript ? (0) | 2007/08/31 |
| Javascript based Alarm Clock (0) | 2007/08/31 |
| Javascript implemented Calendar (0) | 2007/08/31 |
| Basic Date Display (0) | 2007/08/31 |
Trackback : Cannot send a trackbact to this post.
-
Subject different money making ideas
2010/01/28 22:54
moneyideas
-
Subject different money making ideas
2010/01/29 07:11
moneyideas
-
Subject different money making ideas
2010/01/31 16:45
moneyideas

Prev

Rss Feed