Jump to content

Need help -- working in IE but not Firefox


melindaSA

Recommended Posts

I am pulling data from a mySQL database into two dropdowns and then submitting the choices from the dropdowns into another table in the database.  This works great in IE but will not work in Firefox.  The submit to the database of the 2nd dropdown is not working.

 

I have attached my code in a txt file.

 

Any help would be greatly appreciated.....

 

Thank you!!!

 

[attachment deleted by admin]

Link to comment
Share on other sites

Ths is also not working in IE!  It is not working at all, not submitting to the database!

 

If i look at the page source, the 2nd dropdown is shown.... is the following be the problem?  HELP!!

 

<script language="javascript">
function chkprofile(){
err="";
if(profilefrm.sfname.value=="")
err+="- first name is required.\n";
if(profilefrm.slname.value=="")
err+="- last name is required.\n";
if(profilefrm.sschoolid.value=="")
err+="- school is required.\n";
if(profilefrm.sgradeid.value=="")
err+="- grade is required.\n";
//if(profilefrm.sdob.value=="")
//	err+="- date of birth is required.\n";
if(err!=""){
err='Following are the errors : \n'+err;
alert(err);
return false;
}
return true;
}

function getXMLHTTP() { //fuction to return the xml http object
var xmlhttp=false;
try{
xmlhttp=new XMLHttpRequest();
}
catch(e)	{
try{			
	xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
	try{
		req = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch(e1){
		xmlhttp=false;
	}
}
}
return xmlhttp;
}

function getGrade(schoolid) {
profilefrm.sgradeid.value="";
var strURL="findGrade.php?schoolid="+schoolid;
var req = getXMLHTTP();
if (req) {
req.onreadystatechange = function() {
if (req.readyState == 4) {
	// only if "OK"
	if (req.status == 200) {						
		document.getElementById('gradediv').innerHTML=req.responseText;						
	} else {
		alert("There was a problem while using XMLHTTP:\n" + req.statusText);
	}
}				
}			
req.open("GET", strURL, true);
req.send(null);
}
}
</script>

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.