See also: fvRequired

Function used to determine whether the passed value is whitespace.

Syntax

JSV_fsRequired(expV)

Prototype

n/a

Returns

The fsRequired function returns true if the expV is not whitespace; otherwise, false.

Parameters

The fsRequired function uses the following arguments.

Argument Description
expV The information in the field (i.e., object.value).

Remarks

n/a

Dependencies

JSV_isWhitespace

Example

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.

Value: