Jump to content

onChange works with IE but not Firefox


ded

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.