|
|
#1 |
|
In Runtime
Join Date: Dec 2001
Posts: 154
|
Can anyone tell me what is wrong with this code. I am trying to have a google, wikipedia, and dictionary.com search box on my home page. I do not want to have the search button on the page and want to hit enter to start the search. I have the code written but it does not search when I hit enter. I have even added a search button to see if that will work without any success. Here is what I have for the code:
<td width="33%"><p align="center"><strong><u><font color="#C0C0C0">Search Engine</a></font></u></strong></p> <p align="center" form action="http://www.google.com/search"> <input type="text" name="q" value="" id="textbox"> <INPUT TYPE="Submit" VALUE="Search"> <script>document.getElementById('textbox').focus() </script></p> </form> |
|
|
|
|
|
#2 |
|
In Runtime
|
What you need is a separate form for each search box. Give each for a submit button, and the enter key will default to the submit button for that form. Make sure to give each form unique name and id attributes.
Also, form is not part of the <p> tag. For example: Code:
<div> <form id="googleForm" name="googleForm" action="http://www.google.com/search" method="post"> <input type="text" name="q" value="" id="googleText"> <input type="submit" value="Search" id="googleSubmit" name="googleSubmit"> </form> </div> See if that helps.
__________________
**Official Self-proclaimed glorified excessive (insert additional adjectives here) post editor/modifier. Edit = Best feature ever http://www.twitter.com/xDaevax |
|
|
|
|
|
#3 |
|
In Runtime
Join Date: Dec 2001
Posts: 154
|
Code:
<div> <form id="googleForm" name="googleForm" action="http://www.google.com/search" method="post"> <input type="text" name="q" value="" id="googleText"> <input type="submit" value="Search" id="googleSubmit" name="googleSubmit"> </form> </div> thanks for the help |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|