I
Igal
hay. i'm working on some site, the code is pretty old, it has some form
validation JS scripts. but seems like they work only in IE, won't work
with FireFox. here's a example:
<script language="JavaScript" type="text/javascript">
<!--
function check1(){
if (form1.name.value==""){
alert("type your name");
form1.name.focus();
return false;
}
if (form1.mail.value.indexOf("@")==-1){
alert("wrong e-mail");
form1.mail.focus();
return false;
}
if (form1.mail.value.indexOf(".")==-1){
alert("wrong e-mail");
form1.mail.focus();
return false;
}
form1.session_exp.value= "qqq" + form1.name.value + "qqq" +
form1.mail.value + "qqq"
}
//-->
</script>
....<form action="../SendCv/SendCv2.asp" method="post" name="form1"
onsubmit="return check1()">...
what can be wrong with it?
validation JS scripts. but seems like they work only in IE, won't work
with FireFox. here's a example:
<script language="JavaScript" type="text/javascript">
<!--
function check1(){
if (form1.name.value==""){
alert("type your name");
form1.name.focus();
return false;
}
if (form1.mail.value.indexOf("@")==-1){
alert("wrong e-mail");
form1.mail.focus();
return false;
}
if (form1.mail.value.indexOf(".")==-1){
alert("wrong e-mail");
form1.mail.focus();
return false;
}
form1.session_exp.value= "qqq" + form1.name.value + "qqq" +
form1.mail.value + "qqq"
}
//-->
</script>
....<form action="../SendCv/SendCv2.asp" method="post" name="form1"
onsubmit="return check1()">...
what can be wrong with it?