hitting the N its erroing.
If you want to use speach marks within a string you have to escape them, i'm
not sure this'll work, without playing with the code but try
objForm.offtime.validateExp("document.form1.offtime.value == ""Normal"" &&
document.form1.jobno.value() == """"");
if not try
objForm.offtime.validateExp("document.form1.offtime.value == \"Normal\" &&
document.form1.jobno.value() == \"\"");
I can't remember the syntax off the top of my head
hth
MArk
-----Original Message-----
From: Angel Stewart [mailto:[EMAIL PROTECTED]
Sent: 14 November 2003 13:20
To: CF-Community
Subject: RE: Qforms: Field required if selection box equals Normal.
Getting a _javascript_ error in this, and can't figure out why:
objForm.offtime.validateExp("document.form1.offtime.value == "Normal" &&
document.form1.jobno.value() == """);
The error is "Expected )"
I hate _javascript_ syntax :(
-Gel
-----Original Message-----
From: brob [mailto:[EMAIL PROTECTED]
I just took off "document." and changed the alert message syntax. You
might want to consider trimming whitespaces off the jobno field just in
case but i'm lazy to write something :-D
<script LANGUAGE="_javascript_">
function _customValidation()
{
if(form1.offtime.value == "Normal" && form1.jobno.value() == "" )
{
Alert("You must supply a value for either field_A
or field_B");
}
}
</script>
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
