Hi Folks,
If there's a more appropriate place to ask this question, please let me know
- this list is so incredibly high volume,I'd hate to be erroneously
contributing to it when I should send my question elsewhere.
With that said:
I'm doing Javascript validation and having trouble getting the following to
work (it is supposed to only allow user to enter an integer between 1 and
10000):
function fleet_size_check(form) {
ctrl = form.fleet_size;
myRe=/^[0-9]{1,6}/;
if (!myRe.test(ctrl.value)) {
alert("Please enter a valid fleet size.");
document.profile_info.fleet_size.focus();
return (true);
}
else if ctrl.value > 10000 {
alert("Please enter a valid fleet size.");
document.profile_info.fleet_size.focus();
return (true);
}
else return (false);
}
The first "if" seems to work OK, but not the second. Any suggestions would
be most appreciated.
TIA,
- - - Jeanne
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists