Forum Moderators: open

Message Too Old, No Replies

form submission - IE

         

cyberpac9

7:06 pm on Apr 20, 2006 (gmt 0)

10+ Year Member



i have a php form that searches our database. the formatting is done via css. i've tested the form using Firefox and everything works perfectly. when i tried the form in IE it doesn't work as planned, and i've never seen this before. when entering the search string into the search text box and the user hits enter on the keyboard, nothing happens. the user has to use the mouse to click the search button...again, this only happens in IE.

i don't know if my problem lies in some of my javascript, php, css or something else entirely. does anyone have any idea why hitting Enter does not work unless you click it with the mouse?

BlobFisk

7:58 am on Apr 21, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is a common issue! The expected behaviour for a form with only 1 input field is that hitting the enter key will submit the form. Unfortunately different browsers do different things with this.

The way around it is to capture the Enter key in the input and use a script to submit the form. This will ensure constant behaviour.

HTH