Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Validation in Netscape 6

Status
Not open for further replies.

Boblevien

Technical User
Nov 3, 2000
38
GB
I'm trying to check that a form field has been filled

In IE5 I use something like:
function isBlank(box) {
if(document.form1.elements[box].value=="")
{
alert("Sorry, this is a required field");
document.form1.elements[box].focus();
return false;
}
}

I thought that the following would work in both IE5 and NS6


function validlogin() {
If(document.getElementById("emailAddr").value=="")
{
alert("No email");
return false;
}
}

But it doesn't! Any ideas?

Bob.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top