I've got an HTML form that is dynamically generated from a per/cgi script. Depending on various conditions certain fields may or may not be included on the form.
onSubmit runs a form validation function prior which makes sure required fields are populated. Certain fields are required if they are on the form, and not if they aren't (obviously).
Is there some sort of "if exists"-type function in JavaScript I can use to only try to validate the field if it's there?
_________
Rott Paws
...It's not a bug. It's an undocumented feature!!!
onSubmit runs a form validation function prior which makes sure required fields are populated. Certain fields are required if they are on the form, and not if they aren't (obviously).
Is there some sort of "if exists"-type function in JavaScript I can use to only try to validate the field if it's there?
_________
Rott Paws
...It's not a bug. It's an undocumented feature!!!