Hello,
I have a form that will be rendered either as a PDF Form or an HTML form. I have all the script working fine for the PDF version but am stuck with field validations for the HTML form.
I have 2 fields, one that is a Postal Code (Canadian) and one that is a Phone Number. How do I set up the script so that on the Exit event of these fields, it determines if the value is correct or not?
Any assistance would be greatly appreciated.
http://webdesign.about.com/od/forms/a/aa031599.htm
there isn't an exit event in HTML. Validation is typically done on submit. I don't know what you would do for a form rendered to both HTML and PDF, But to find out I would render the XFA as HTML, and then look at the structure of the document and format for the submit button. The structure should parallel the XFA structure. I would also think that scripting objects would convert into script sections. But this is the kind of thing you'll need to find out to be able to script for both HTML and PDF.
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script