English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

wherein the user input something in the text field, and when he/she clicks the search button, it will navigate my site given the keyword

2006-06-16 17:10:06 · 4 answers · asked by rbt_guerrero 1 in Computers & Internet Programming & Design

4 answers

I dont think, using Javascript you can create a search function, but I can give you a code which you can incorporate anywhere you want in your website which will search the keyword in Google in a new browser window. In case if you want the search to be in the same page then just remove the [ target="_new" ] portion from the code. Hope this fulfills your requirement.









2006-06-16 18:20:49 · answer #1 · answered by Anshu 2 · 0 0

This is a common misconception. Javascript is entirely clientside code. There is no way for javascript to search your server.

In general, providing a search capability often involves an intimate knowledge of your server, or a search engine which has been configured to spider your server, creating your own mini-yahoo or google. Htdig is one such system. There are also 3rd party services that provide this, Atomz being one of the best known. It should also be pointed out that many websites are database driven, in that the site is generated dynamically, with much of the data that's presented in the webpages being stored in a database. Often those sites provide their own search functions which query the database. I provided a link to htdig so you can read more on the topic.

2006-06-17 00:21:26 · answer #2 · answered by Gizmo L 4 · 0 0

It would be too complicated to post on Yahoo Answers. Try checking out HotScripts.com or something.

2006-06-17 00:14:43 · answer #3 · answered by Intentionality 4 · 0 0

em.... HELLLOOOOO! JavaScript doesn't do that!

2006-06-17 12:21:32 · answer #4 · answered by Kheme 5 · 0 0

fedest.com, questions and answers