Wikipedia Search Box
Information Sites
|
Other Pages
Site written by
John Middlemas
Homepage
Back
Site Contents Map
Page Index A to Z
Main Pages
Download Plexel
Add Url Free
Java
Free Javascript
Applets
Portfolio
Javascript Web Design
Other Pages
A little tune:
mp3
|
real
Reference
Information Sites A-Z
About us
Contact us
Privacy Policy
Other Pages
- Not to do with Plexos. Robots, art, Segway, various topics
Wikipedia Search Box. Javascript and HTML to make it quicker to search Wikipedia. Also searches Google.
Go Wikipedia
Search Wikipedia
Search Google
(or press Enter)
To use the search box above in your page copy the HTML in the textarea below and paste it into your page.
Hitting Enter will start a Google search for what is in the search box.
All searches should open in a new browser window.
<SCRIPT> document.captureEvents(Event.KEYPRESS); document.onkeypress = keyHandler function srch(engine,what) { var wiki, google, url google="http://www.google.com/search" wiki="http://en.wikipedia.org/wiki/Special:Search" text=document.searchForm.q.value if(engine=="google") { text=escape(text) url=google + '?num=30&hl=en&lr=&safe=off&q=' +text+ '&btnG=Search' } else if(engine=='wiki') { if(what=="go") { url=wiki + '?search=' +escape(text)+ '&go=Go' } else if(what=="search") { url=wiki + '?search=' +escape(text)+ '&fulltext=Search' } } window.open(url) return} function keyHandler(evt) { // On Enter do a google search in a new window // return false means don't pass the keypress the Master window, otherwise do. var google, text, url if(evt.which==13) { // Enter key pressed google="http://www.google.com/search" text=document.searchForm.q.value text=escape(text) url=google + '?num=30&hl=en&lr=&safe=off&q=' +text+ '&btnG=Search' window.open(url) return false } return} </SCRIPT> <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1"> <TR><TD BGCOLOR="skyblue"> <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1"> <TR> <form action="http://www.google.com/search" method="get" name="searchForm"> <TD ROWSPAN="4" BGCOLOR="lavender" VALIGN="MIDDLE"> <input type="hidden" name="num" value="30"> <input type="hidden" name="hl" value="en"> <input type="hidden" name="safe" value="off"> <input maxlength="2048" size="30" name="q" value="" title="Google Search" style="font-family: courier new; font-size:10pt"> <input type="hidden" name="btnG" value="Search"></TD></form> <TD BGCOLOR="lavender"> <A HREF="javascript:void(0)" onClick="srch('wiki','go');return false"> <FONT FACE="Verdana,Arial" SIZE="1" COLOR="blue">Go Wikipedia</FONT></A></TD> </TR> <TR> <TD BGCOLOR="lavender"> <A HREF="javascript:void(0)" onClick="srch('wiki','search')"> <FONT FACE="Verdana,Arial" SIZE="1" COLOR="blue">Search Wikipedia</FONT></A></TD> </TR> <TR> <TD BGCOLOR="lavender"> <A HREF="javascript:void(0)" onClick="srch('google')"> <FONT FACE="Verdana,Arial" SIZE="1" COLOR="blue">Search Google</FONT></A></TD> </TR> <TR> <TD BGCOLOR="lavender"> <A HREF="javascript:void(0)" onClick="srch('google')"> <FONT FACE="Verdana,Arial" SIZE="1" COLOR="black">(or press Enter)</FONT></A></TD> </TR> </TABLE></TD></TR></TABLE>
Site written by John Middlemas