I have this code written into my head tag:
<script language="JavaScript">
<!--
function checkData (){
if (document.signup.APPLICANT_A_FIRST_NAME.value == "") {
alert("Please fill in your first name.")
document.signup.APPLICANT_A_FIRST_NAME.focus()
return false}
if (document.signup.APPLICANT_A_LAST_NAME.value == "") {
alert("Please fill in your last name.")
document.signup.APPLICANT_A_LAST_NAME.focus()
return false}
if (document.signup.APPLICANT_A_EMAIL.value == "") {
alert("Please fill in your email address.")
document.signup.APPLICANT_A_EMAIL.focus()
return false}
else{
if (document.signup.APPLICANT_A_EMAIL.value != "") {
var mailaddr = document.signup.APPLICANT_A_EMAIL;
mailaddr.value = " " + mailaddr.value;
}
if (document.signup.HOME_TELEPHONE.value == "") {
alert("Please fill in your home telephone.")
document.signup.HOME_TELEPHONE.focus()
return false}
else{
if (document.signup.HOME_TELEPHONE.value != "") {
var first = document.signup.HOME_TELEPHONE;
first.value = " " + first.value;
}
if (document.signup.MAILING_ADDRESS.value == "") {
alert("Please fill in your mailing address.")
document.signup.MAILING_ADDRESS.focus()
return false}
else{
if (document.signup.MAILING_ADDRESS.value != "") {
var second = document.signup.MAILING_ADDRESS;
second.value = " " + second.value;
}
if (document.signup.CITY.value == "") {
alert("Please fill in your city.")
document.signup.CITY.focus()
return false}
if (document.signup.STATE.value == "") {
alert("Please fill in your state.")
document.signup.STATE.focus()
return false}
if (document.signup.ZIP.value == "") {
alert("Please fill in your zip code.")
document.signup.ZIP.focus();
return false}
else{
if (document.signup.ZIP.value != "") {
var third = document.signup.ZIP;
third.value = " " + third.value;
}
}
}
}
}
}
</script>
Works fine in IE but NS7 and Opera6 won't display the page at all with this code present. If I remove the code the page displays. Huh? I don't get it. Can anyone help?
Thank-you.
<script language="JavaScript">
<!--
function checkData (){
if (document.signup.APPLICANT_A_FIRST_NAME.value == "") {
alert("Please fill in your first name.")
document.signup.APPLICANT_A_FIRST_NAME.focus()
return false}
if (document.signup.APPLICANT_A_LAST_NAME.value == "") {
alert("Please fill in your last name.")
document.signup.APPLICANT_A_LAST_NAME.focus()
return false}
if (document.signup.APPLICANT_A_EMAIL.value == "") {
alert("Please fill in your email address.")
document.signup.APPLICANT_A_EMAIL.focus()
return false}
else{
if (document.signup.APPLICANT_A_EMAIL.value != "") {
var mailaddr = document.signup.APPLICANT_A_EMAIL;
mailaddr.value = " " + mailaddr.value;
}
if (document.signup.HOME_TELEPHONE.value == "") {
alert("Please fill in your home telephone.")
document.signup.HOME_TELEPHONE.focus()
return false}
else{
if (document.signup.HOME_TELEPHONE.value != "") {
var first = document.signup.HOME_TELEPHONE;
first.value = " " + first.value;
}
if (document.signup.MAILING_ADDRESS.value == "") {
alert("Please fill in your mailing address.")
document.signup.MAILING_ADDRESS.focus()
return false}
else{
if (document.signup.MAILING_ADDRESS.value != "") {
var second = document.signup.MAILING_ADDRESS;
second.value = " " + second.value;
}
if (document.signup.CITY.value == "") {
alert("Please fill in your city.")
document.signup.CITY.focus()
return false}
if (document.signup.STATE.value == "") {
alert("Please fill in your state.")
document.signup.STATE.focus()
return false}
if (document.signup.ZIP.value == "") {
alert("Please fill in your zip code.")
document.signup.ZIP.focus();
return false}
else{
if (document.signup.ZIP.value != "") {
var third = document.signup.ZIP;
third.value = " " + third.value;
}
}
}
}
}
}
</script>
Works fine in IE but NS7 and Opera6 won't display the page at all with this code present. If I remove the code the page displays. Huh? I don't get it. Can anyone help?
Thank-you.