I have a form with a submit by email button. I would like the value of the associated email address to change based on a value selected in a separate pulldown menu.
Do I set a variable at a "global" level based on the pulldown changing?
or
Do I use an if statement on the button click?
I am very green to Adobe, but comfortable with forms and javascript, but not having any luck with this.
doc.mailForm() and doc.submitForm()
The first one 'doc.mailForm()' does not work in Reader unless the form has Forms Rights enabling. If you want it to work in Reader use 'doc.submitForm()'. Look it up in the Acrobat JavaScript Reference and it is discussed in this article, [url=http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/submitting_data/] submitForm[/url]
On the form, set the export values of the list field entries to the actual emails, then you can use the list field value directly in the 'submitForm()' fucntion.
Thom Parker
WindJack Solutions
[url=http://www.windjack.com]www.windjack.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://partners.adobe.com/public/developer/en/acrobat/sdk/
pdf/javascript/AcroJS.pdf]Acrobat JavaScript Reference[/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script