I have a user search form. THe user can search records with one criteria. When they have entered the searching criteria they must click on the submit button to perform the search.
As it is now, if the user enters the serach criteria and pushes <enter> the search doesn't go through... it will only work if they click on the Submit button.
What I would like to know is if there is a way to link the submit button with the input box so when they have entered the criteria they can just push <enter> and this will 'click' the submit button.
I know about tabindex which is very very smiilar to what I want to do, but it doesn't do the job.
Does anyone understand what I'm trying to acheive with this, and can you help??
This is a bit of my code....
I've tried mvoing the last</input> tag to after the submit button, but still no joy.
Any idea's from anyone?
As it is now, if the user enters the serach criteria and pushes <enter> the search doesn't go through... it will only work if they click on the Submit button.
What I would like to know is if there is a way to link the submit button with the input box so when they have entered the criteria they can just push <enter> and this will 'click' the submit button.
I know about tabindex which is very very smiilar to what I want to do, but it doesn't do the job.
Does anyone understand what I'm trying to acheive with this, and can you help??
This is a bit of my code....
I've tried mvoing the last</input> tag to after the submit button, but still no joy.
Code:
echo '<form method="POST" action="'.$PHP_SELF.'">';
echo '<select name="searchby">';
echo '<option value="Outlet">Outlet</option>';
echo '<option value="Cardport">Card Port</option>';
echo '<option value="Extnum">Ext Num</option>';
echo '</select><br><br>';
echo 'Search Field: <br><input type="Text" name="searchitem"></input><br><br><br>';
echo '<input type="Submit" name="submit" value="SEARCH"></form><br><br>';
Any idea's from anyone?