on 11-10-2010 8:08 PM
Hi,
How can I have dynamic E-Mail address assigned/bind within my Interactive Form for "Email Submit button"?
If binding isn't an option then in which method should I write JavaScript code and how can I get my node value reference? If I select "Email Submit button" then click event is disabled. Are there any blogs or examples on how to access node data within JavaScript events?
Thanks and Regards,
Take a look at this blog --> [Dynamically populating the email address of an email button on a SAP Interactive Form|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6676] [original link is broken] [original link is broken] [original link is broken];
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your responses but I still couldn't make my scenario work
I have E-Mail address value within context node attribute:
I_HEADER->EMAIL_ADDRESS
And I am trying to access and assign the value within event Initialize using:
this.resolveNode("#event.#submit").target = "mailto:" + xfa.datasets.data.data.I_HEADER.EMAIL_ADDRESS.value;
But I always get error message when I open PDF.
I even tried to output the value contained in EMAIL_ADDRESS attribute using:
xfa.host.messageBox( xfa.datasets.data.data.I_HEADER.EMAIL_ADDRESS.value );
But the value is always empty.
I also tried following but no luck:
var emailAddress = xfa.resolveNode("xfa.datasets.data.data.I_HEADER.EMAIL_ADDRESS");
this.resolveNode("#event.#submit").target = "mailto:" + emailAddress.item.value;
How can I access any node attribute value within JavaScript?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srinivas,
To use a dynamic email address you'll need to use a JavaScript function, there are two:
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, <a href="http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/submitting_data/">submitForm</a>
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.
a clear requirement and explanation in the below post
http://65.181.155.238/forum/javascript/dynamic-email-address-based-pulldown-value
Happy coding...
Cheers,
Sai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.