|
Oracle Portal allows you to create JavaScripts that perform validation on entry fields in forms and customization forms. Field-level validation is performed when the end user causes the OnBlur condition to occur after entering a value in an entry field, for example, when tabbing to another entry field. Form-level validation occurs after the user enters a value in an entry field and submits all values on the page, for example, when clicking an OK button. Follow these guidelines when writing a field- or form-validation JavaScript. All validation routines should be written as functions, and return either TRUE or FALSE values.
The following JavaScript validates that the user enters a numeric value into an entry field: 1) Identifies the name of the function and the entry field being validated. 2) Checks whether the absolute value of the entry field is a number. IsNaN ("Is Not a Number") is a JavaScript function. 3) If the value in the entry field is not a number, the user is alerted with the message, "Value must be a number." 4) The routine brings focus to the entry field.
Oracle Portal ships a default set of JavaScript routines. |
|
|
|
|
|
To build a JavaScript: |
|
|
Notes |
|
|
|
|