My page doesn't work when I tested in Opera. It works in IE though. I only have those two browsers
I took the code from one the forum
But it even refused alert.
Anyone knows what I'm doing wrong?
thanks!
I took the code from one the forum
But it even refused alert.
Anyone knows what I'm doing wrong?
Code:
function subForm(){
for (x=0; x<document.myForm.elements.length; x++){
if (document.myForm.elements[x].value == ""){
alert("Please fill in all blanks")
return false;
}
}
alert("Hello!");
//now that we've checked the form, submit it to new window
formWin = window.open("about:blank","formWin","height=420,width=470")
document.myForm.action = "tryout2.php"
document.myForm.method = "post"
document.myForm.target = "formWin"
document.myForm.submit()
}
</script>
<form name="myForm">
<input type=text name="f_name">
<input type=button value="Submit" onClick="subForm()">
</form>
thanks!