Is there any quick fix that I can do to the code above to make it work in Netscape?
In that case, the previous value of the field is restored, and the user has to enter the data again.
This is not always desired (for more complicated data, it will probably be much easier to take a look, correct that one typo and continue with the rest of the form), so my preference is actually to mark the field so that the user knows which field needs to be corrected, and have the validation script not report a validation error back to the field: Using this method has implications on the form submission process: The form no longer can verify that the data is correct, so the submission function needs to do another round of validation to see if any of the required fields are not correct (one way to do that is to test all relevant fields to see if the text color is using the error color, or we can use global variables to store the validation state).
One of the questions I get asked again and again is how to validate a field value in an Acro Form with a custom validation script.
Adobe provided a lot of infrastructure to do that with just a simple script.
To start, we create a text field and bring up the properties dialog for the field.
Then we select the “Validate” tab to see the validation options: The default is that the field will not get validated.
I have wrote the following function: However their are still a few issues I would like to work out.
In the latter case, we set rc to false, and also display an error message.
When you play around with the function, you’ll notice that the validation function is only called when the focus leaves the field, so you have to click outside of the field to actually make that error message pop up.
I am attempting to validate radio buttons in Netscape with Java Script.
Everything works excellent in Explorer, but refuses to work in Netscape (all versions).