I am not sure about the answer to "Do you know the value you are validating against?"
My typical FWX file has the following structure:
* SETUP CODE, GET Session Variables, Open Files, Run Queries, Etc.
I could lookup the password in the setup code but I think that may be too late, or is it? When is the '<%=pswd%>' from your example resolved? Does my setup code run first allowing me to retreive the value from a database
or session variable?
Sent by FoxWeb Support on 06/26/2006 09:47:40 PM:
<form ... (your form)
You could even populate an array with a bunch of values.
If, on the other hand, you are validating against a large set of values (such as your password example), then there are two options:
- Split data entry into two pages. First ask for the values that need to be validated and in the following request return a form that asks for the file upload.
- Use AJAX to retrieve the values that you want to validate against. There are lots of resources on the web that provide information on this subject.
|FoxWeb Support Team|
Sent by Jeff Grippe on 06/26/2006 01:28:51 PM:
I need to validate a form value before the user clicks submit in order to prevent a long file upload when a required password is incorrect.
The form line contains onsubmit="return validate()"
Thank you very much.