Click to See Complete Forum and Search --> : 2 validations in a field


zulu99
12-31-2002, 12:04 AM
Hi

I want to have 2 validations in my field one for checking null values & the other for checking dates. i am calling both the functions on blur event of the field. but only 1 function gets called the 1 which is called first, the second function doesnt get called at all

i am posting a part of my code here

<tr>
<td>Date Validation:</td>
<td><input type="text" name="txt3" maxlength="11" onblur="javascript:return checknull(this); return checkdate(this);"
title="Enter Date as: DD-MMM-YYYY"></td>
</tr>

Kindly reply

Regards
Sushant

luc
12-31-2002, 04:34 AM
I don't know what you're doing into your checking routines...

but isn't it true that only the last statement with output will give output when you use javascript in event handlers?

So, if function 1 gives a message, function 2 not, message of funtion 1 will not be displayed? (I'm not 100% sure)

Can you put the 2 functions into another function witch you can set in the onblur? Maybe you can try...

khalidali63
12-31-2002, 10:47 AM
just strip out the word "javascript:"

before the functions,they booth should produce the result

Just curious,why you used this format?

onblur="javascript: return function();return function()"