Hi,<br>
<br>
I want my form validation to be on a field by field basis.<br>
Therefore I use the onBlur() event. <br>
<br>
Problem is that depending on the user action. Mouse is move is oke but tab produces a browser lockup between the field that is left and the next one its about to enter.<br>
<br>
<br>
I do like this:<br>
<br>
in: verify.js<br>
<br>
----knip-------<br>
//<SCRIPT LANGUAGE="JavaScript"><br>
<br>
function senderCheck() {<br>
<br>
if (document.forms[0].sender.value.length == 0 ) {<br>
ErrorMsg("Sender name is mandatory!"<br>
document.forms[0].sender.select(); <br>
}<br>
}<br>
//=end=====================================================<br>
<br>
function recipCheck() {<br>
<br>
if ( document.forms[0].recipient.value.length == 0 ) {<br>
ErrorMsg("No Recipient name is given!"<br>
document.forms[0].recipient.select(); <br>
}<br>
}<br>
<br>
remark: ErrorMsg is just a alert() function.<br>
These functions are nearly identical but must stay apart for other reasons.<br>
----knip-------<br>
<br>
<br>
in sendsome.htm<br>
<br>
----knip-------<br>
<head><br>
<script type="text/javascript" language="JavaScript" src="verify.js"></script> <br>
</head><br>
----knip-------<br>
<form name="theForm" method="post" action="../../cgi-bin/some.cgi" target="content"><br>
sender:<br>
<input type="text" size="35" name="sender" onBlur="senderCheck()"> *<br>
recipient:<br>
<input type="text" size="35" maxlength="25" name="recipient" onBlur="recipCheck()"> *<br>
<input type="submit" value="Send"><br>
<input type="reset" value="Cancel"><br>
</form><br>
<br>
----knip-------<br>
<br>
<br>
and besides, is there anybody out here who has some advise <br>
or pointers on to some handy tools for writing and DEBUGGING JavaScript code ? <br>
Netscapes debugger didnt work (js error prevented downloading, anyway didnt found the app)<br>
<br>
Ohja it must work offline aswell<br>
<br>
<br>
Thank you all very much<br>
<br>
<A HREF="mailto:sluiter@cmpmail.com">sluiter@cmpmail.com</A><br>
<br>
<br>
<br>
I want my form validation to be on a field by field basis.<br>
Therefore I use the onBlur() event. <br>
<br>
Problem is that depending on the user action. Mouse is move is oke but tab produces a browser lockup between the field that is left and the next one its about to enter.<br>
<br>
<br>
I do like this:<br>
<br>
in: verify.js<br>
<br>
----knip-------<br>
//<SCRIPT LANGUAGE="JavaScript"><br>
<br>
function senderCheck() {<br>
<br>
if (document.forms[0].sender.value.length == 0 ) {<br>
ErrorMsg("Sender name is mandatory!"<br>
document.forms[0].sender.select(); <br>
}<br>
}<br>
//=end=====================================================<br>
<br>
function recipCheck() {<br>
<br>
if ( document.forms[0].recipient.value.length == 0 ) {<br>
ErrorMsg("No Recipient name is given!"<br>
document.forms[0].recipient.select(); <br>
}<br>
}<br>
<br>
remark: ErrorMsg is just a alert() function.<br>
These functions are nearly identical but must stay apart for other reasons.<br>
----knip-------<br>
<br>
<br>
in sendsome.htm<br>
<br>
----knip-------<br>
<head><br>
<script type="text/javascript" language="JavaScript" src="verify.js"></script> <br>
</head><br>
----knip-------<br>
<form name="theForm" method="post" action="../../cgi-bin/some.cgi" target="content"><br>
sender:<br>
<input type="text" size="35" name="sender" onBlur="senderCheck()"> *<br>
recipient:<br>
<input type="text" size="35" maxlength="25" name="recipient" onBlur="recipCheck()"> *<br>
<input type="submit" value="Send"><br>
<input type="reset" value="Cancel"><br>
</form><br>
<br>
----knip-------<br>
<br>
<br>
and besides, is there anybody out here who has some advise <br>
or pointers on to some handy tools for writing and DEBUGGING JavaScript code ? <br>
Netscapes debugger didnt work (js error prevented downloading, anyway didnt found the app)<br>
<br>
Ohja it must work offline aswell<br>
<br>
<br>
Thank you all very much<br>
<br>
<A HREF="mailto:sluiter@cmpmail.com">sluiter@cmpmail.com</A><br>
<br>
<br>