See also: fvRequired |
Function used to determine whether the passed value is whitespace.
JSV_fsRequired(expV)
n/a
The fsRequired function returns true if the expV is not whitespace; otherwise, false.
The fsRequired function uses the following arguments.
Argument | Description |
expV | The information in the field (i.e., object.value). |
n/a
The following lines of code
function CheckField() {
if (!JSV_fsRequired(document.RequiredForm.MyValue.value)) {
alert("This field must contain a value.");
document.RequiredForm.MyValue.value = "Wowzo";
}
}
<FORM NAME="RequiredForm">
<B>Value:</B> <INPUT TYPE="Text" NAME="MyValue" SIZE="8" MAXLENGTH="8">
<INPUT TYPE="Button" NAME="RequiredCheck" VALUE="Check" onClick="CheckField();">
</FORM>
produce
Delete the value in the field and click the Check button.
Copyright © 1998-2000 Roaring Fork Software. All rights reserved.