Jim,


i presume session1 is a field name within your form and you want the validation at on submit event....remember _javascript_ is a case-sensitive language
unlike CF.
The _javascript_ Bible, by Dan Goodman is an excellent book

Pat


<script>
<!--


function valid() {


if (document.forms[0].session.value == 'yes' ) &&
   (document.forms[0].field2.value != '' or document.forms[0].field3.value != '') {
   alert("field 2 and field3 are required....");
   return false;
}


return true;
}


</script>


<form name="x" valid(); " >
......
</form>

-----Original Message-----
From: Jim Louis [mailto:[EMAIL PROTECTED]
Sent: Saturday, May 15, 2004 7:55 PM
To: CF-Talk
Subject: OT: Need to have a _javascript_ that selectively validates

I have a web form that I need _javascript_ validation for if
Session1 is "yes" then field2 and field3 are required.  
If session 1 is "no" then field 2 and field3 are not required.

Can someone point me in the right direction.  I want to use javascipt because the rest of the form validation is using it.

Jim Louis
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to