problem with enter key

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
User avatar
irealms
Forum Contributor
Posts: 215
Joined: Mon Apr 28, 2003 7:10 am
Location: Leeds

problem with enter key

Post by irealms »

I have a simple search form and when you press the enter key it doesn't activate the button just makes the text in search field blank, any ideas?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

your form processor (likely that page) is looking for the submit button. When pressing enter, the submit button is not sent. Switch the form processing to look for the search text field.
dragnlo
Forum Newbie
Posts: 4
Joined: Thu Mar 18, 2004 12:00 pm

Post by dragnlo »

Easiest fix will probably be to put a a hidden field on the form named submit

Code: Select all

<input type=hidden name=submit value=submit>
<input type=submit name=submit value=submit>
This is also usefull if your submit button is an image.
Post Reply