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 Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.