ded Posted July 25, 2008 Share Posted July 25, 2008 Hello All, The following code works perfectly fine with IE, but does nothing when using Firefox. Any suggestions? <script type="text/javascript"> <!-- function personHandler(form){ var URL = "http://www.website.com/rollcall/index.php?rrn="+rollcall.rrn.value; window.location.href = URL; } //--> </SCRIPT> <?php $dbh=mysql_connect ("localhost", "username", "password") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("database"); $query = "SELECT * FROM `rollcall` ORDER BY `lname`"; $result = mysql_query($query,$dbh) or die(mysql_error()); if (result){ echo "<br /><br /><center><form name=\"rollcall\">"; echo "<select name=\"rrn\" size=1 onChange=\"javascript:personHandler()\">"; echo "<option value=''>Select Individual</option>"; while($row = mysql_fetch_array($result)) { echo "<option value='{$row['rrn']}'>{$row['lname']}, {$row['fname']}</option>"; } echo "</select></form></center>"; } ?> Regards, DED Link to comment https://forums.phpfreaks.com/topic/116596-onchange-works-with-ie-but-not-firefox/ Share on other sites More sharing options...
ded Posted July 25, 2008 Author Share Posted July 25, 2008 I figured it out......needed var for the rollcall. Thanks. Link to comment https://forums.phpfreaks.com/topic/116596-onchange-works-with-ie-but-not-firefox/#findComment-599535 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.