submit button not working

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
theBond
Forum Newbie
Posts: 19
Joined: Thu Jul 17, 2008 7:46 pm

submit button not working

Post by theBond »

Submit button not working in IE when i use enter key. It works when i use mouse. It works fine in firefox.

this is the code i am using,

Code: Select all

<form method='post' action='mypage'>
<input type='text' name='myname' value=''>
 
<input type='submit' name='submit' value='submit'>
 
</form>
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: submit button not working

Post by Christopher »

Yes, IE will not send the submit button when Enter is used to submit the form. You need to do something like this:

Code: Select all

<form method='post' action='mypage'>
<input type='hidden' name='submit' value='yes'>
<input type='text' name='myname' value=''>
 
<input type='submit' name='submit_button' value='submit'>
 
</form>
(#10850)
Post Reply