Link to home
Start Free TrialLog in
Avatar of cbastian-hill
cbastian-hillFlag for United States of America

asked on

Javasript Autosubmit won't work in IE

I have a page that displays data from a database.  At the top of the page is a select box that allows you to sort the data various ways.  I don't want a submit button, just an onchange type event.  Right now, when you change the select box, it reloads the page with the sort.  But it will not work in IE.  Everything but IE works perfect.

Any ideas on how I can code this so that IE will auto submit as well?
<form method="POST" name="sortForm" id="sortForm" action="<?php $_SERVER['PHP_SELF'] ?>" onchange="javascript:document.sortForm.submit();"
   <b>Sort Order : </b>
   <select name="sort" id="sort">
      <option value="id" <?php if ($sort == "null"){ ?> SELECTED <?php } ?> >ID</option>
      <option value="stuName" <?php if ($sort == "stuName"){ ?> SELECTED <?php } ?> >Name</option>
      <option value="contEmail" <?php if ($sort == "contEmail"){ ?> SELECTED <?php } ?> >E-mail</option>
      <option value="loanSemester" <?php if ($sort == "loanSemester"){ ?> SELECTED <?php } ?> >Semester</option>
      <option value="status" <?php if ($sort == "status"){ ?> SELECTED <?php } ?> >Status</option>
   </select>
</form>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of LordOfPorts
LordOfPorts
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cbastian-hill

ASKER

Solution made me feel like an idiot...:)  Can't believe I didn't think to try this.  Excellent seggestion, worked perfect...