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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need and "exit sub" like in vbscript

Status
Not open for further replies.

stan8450

Programmer
May 3, 2002
16
CA
I have a number of validations in my form using javascript. While validating, I would like the validation to stop and set focus to the text box that has a false validation. Like the exit sub in vbscript. Here is what I have so far:

if ( document.calcform.SqFt.value == "" )
{
alert ( "Please enter in the approximate Square Footage of you house." );
document.calcform.SqFt.focus();
valid = false;
}

any help appreciated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top