Javascript Submit executes form.submit despite errors

Good Day All,

I am having an issue were when I click submit the f.submit() at the end of my code is executing, despite the fact that it should have errored out and returned false?

function f_Submit()

{

var f = document.forms[0];

if ( f.User_Name.value=="" )  

 	{ 

		alert ("Please enter your Name.");

		f.User_Name.focus();

        		f.User_Name.select(); 

		return false;

}

if ( f.Contact_Number.value=="Please update your info in the Global Address Book (names.nsf)")  

 	{ 

		alert ("Please enter your Phone Nunber.");

		f.Contact_Number.focus();

     			f.Contact_Number.select(); 

		return false;

}

if ( f.Contact_Number.value=="" )  

 	{ 

		alert ("Please enter your Phone Nunber.");

		f.Contact_Number.focus();

     			f.Contact_Number.select(); 

		return false;

}

f.submit();

return true;

}

I cannot find where my error is in this script.

Any help would be appreciated as awlays… Just need that second set of eyes… Or wish mine worked…

Subject: Javascript Submit executes form.submit despite errors

Can you post the code that calls the f_Submit() function?

Subject: RE: Javascript Submit executes form.submit despite errors

!–//–>]INPUT TYPE=“image” img=“submit.gif” VALUE=“Submit”
onClick=“f_Submit()”>]

Subject: RE: Javascript Submit executes form.submit despite errors

what happens if do this: … onClick=“return f_Submit()”>]

Subject: RE: Javascript Submit executes form.submit despite errors

what happens if do this: … onClick=“return f_Submit()”>]

Subject: RE: Javascript Submit executes form.submit despite errors

IT works, of course, why wouldn’t when I was wanting it to return a value to continue or not… ERRR, I hate when I forget the basics…

Thanks Steve.

Someone wana kick me in the arse, maybe my brains will return to my head…

Subject: RE: Javascript Submit executes form.submit despite errors

Lotus has an issue with this, I had to use a Button instead of an image and it runs fine…

Lotus Masters, am I wrong? is this a Notes Issue or limitation?