View Full Version : IE not submitting on Enter

05-25-2005, 08:19 PM
I'm having an issue with a form not submitting when the Enter key is used in Internet Explorer. Basically, once the information has been filled out, if the Enter key is used to submit the form in IE, the page refreshes but no search is performed. This problem does not exist with Firefox, or any other browser, and I have so far been unable to find a solution (the submit button works but I would like to get the page to properly submit on Enter since most users try that and calls keep coming in complaining about this).

Here's the table part of the form that I used:

<table align="center" border="0" cellpadding="5" cellspacing="5">
<tr align="left">
<td><strong>Class Of</strong></td>
<td><select name="class">
<option value="classof_2006">2006</option>
<option value="classof_2007">2007</option>
<option value="classof_2008">2008</option>

<option value="classof_2009">2009</option>
<option value="classof_2010">2010</option>
<option value="classof_2011">2011</option>
<option value="classof_2012">2012</option>
<option value="classof_2013">2013</option>
<option value="classof_2014">2014</option>

<option value="classof_2015">2015</option>
<option value="classof_2016">2016</option>
<option value="classof_2017">2017</option>
<option value="classof_2018">2018</option>
<option value="classof_2019">2019</option>
<option value="classof_2020">2020</option>

<option value="classof_2021">2021</option>
<option value="classof_2022">2022</option>
<option value="classof_2023">2023</option>
<td><select name="lottery">
<script type="text/javascript">userInfo.printOptions("lottery")</script>

<td><select name="status">
<option value="S">S</option>
<option value="E">E</option>
<option value="A">A</option>
<option value="O">O</option>

<td><strong>Family Number</strong></td>
<td><input type="text" name="famnum" size="4" maxlength="4"></td>

<div align="center">
<input type="submit" name="submit" value="Submit">

I apologize if this is the incorrect forum for this problem, but any help would be greatly appreciated.

05-25-2005, 09:45 PM
A link to the page would help since it's form related and some of the code you've left out may be affecting the part you have posted. What does your javascript do? And does the HTML validate, you're not missing a closing </form> or anything?

05-26-2005, 05:33 AM
Here's a link to the page: http://www.lewiscenter.org/aae/services/search.php

Basically, it's used to search for students on the waiting list to get into this school. By entering the year they graduate, the lottery number they are a part of, their status, and their assigned family number, you can find information on the student's place in the waiting list.

Here's the link to the HTML validator for this page on w3.org: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.lewiscenter.org%2Faae%2Fservices%2Fsearch.php

Could either of those two problems be causing the issue?

05-26-2005, 12:41 PM
I can't see your php code but I had a similar problem where the php script was looking for if $POST["submit"] - therefore if the enter button had not been pressed submit would not be sent with all the other variables which were

if you do have any such conditional try looking for something other than submit - equally you could just check for $_POST possibly

this may not be your problem at all but apart from that I can't think of any other ideas

good luck!