tektipsismyfavorite
Technical User
I have an iframe with nothing but a form inside it and for some strange reason, the form won't submit in IE. It works fine in Firefox, but hangs in IE.
iframe:
form:
onclick function
In IE, it will still do the alert(), rename Submit, and disable it, but won't process the form.
iframe:
Code:
<iframe id="info" src="moreinfo.php" frameborder="0" width="500" height="410" scrolling="no"></iframe>
form:
Code:
$submitFormAction = $_SERVER['PHP_SELF'];
//-------------------------
<form id="develop" name="develop" method="post" action="<?php echo $submitFormAction; ?>">
onclick function
Code:
function checkForm(){
var errStr = null;
if(document.develop.name.value == ""){
errStr = "\nPlease enter your name.";
}
if(document.develop.email.value == ""){
if(errStr == null){
errStr = "\nPlease enter your email address.";
} else {
errStr += "\nPlease enter email address.";
}
}
rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-zA-Z]{2,4}$");
if(document.develop.email.value != "" && !rx.test(document.develop.email.value)){
if(errStr == null){
errStr = "\nPlease provide a valid email address.";
} else {
errStr += "\nPlease provide a valid email address.";
}
}
if(document.develop.aoe.value == ""){
if(errStr == null){
errStr = "\nPlease select an area of expertise.";
} else {
errStr += "\nPlease select an area of expertise.";
}
}
if(document.develop.reason.value == ""){
if(errStr == null){
errStr = "\nPlease tell us why you want to help.";
} else {
errStr += "\nPlease tell us why you want to help.";
}
}
if(errStr != null){
alert("There were some errors:\n"+errStr);
return false;
} else {
document.develop.Submit.value = "Sending...";
document.develop.Submit.disabled = true;
return true;
}
}