Previous | Next | (P-PDF) Beginners
Topic: JavaScript eval ' ' and false in 5.0?
Conf: (P-PDF) Beginners, Msg: 24356
From: jamiecollins99
Date: 7/23/2001 02:14 PM
Unless I'm missing something simple, JavaScript in 5.0 appears to be evaluating field values of an empty string and false as the same thing. But maybe my code is incorrect.
if (a.value == "")
{
app.a lert("a.value = empty string");
return;
}
else if (a.value == false || a.value == "false")
{
app.a lert("a.value = false");
b.value = "X";
}
I need to exit the script if the field doesn't have a value, but it is exiting even when the value is: false. The 'else if' statement is never executing. Suggestions appreciated.
Thanks,
Jamie
(Ancillary question: I've been developing strictly JavaScript in PDF's for about 6 months. Does my experience or the nature of this question make it appropriate for the 'Developers' forum heading?)