Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Email script problem

Not applicable
Can someone help me with the script below, I can't make it to work!!!!!

This I try to achive is after printing, to email the form as PDF.



For Click event in a PRINT Button:

form1.subALL.Submit.Print::click - (JavaScript, client)

xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 0, 0, 0, 0);



Also into the same PRINT Button for PostPrint event :



form1.subALL.Submit.Print::postPrint - (JavaScript, client)

{

xfa.host.messageBox("You are about to Email the form\n\nThank you!","EMAIL FORM",3);



var DropList =Drop_1.rawValue;

var subjectbody = "?subject=" + DropList + "&body=Hello!";

Email_Button.resolveNode("#event.#submit").target = "mailto:" + "xxx@xxxx.org" + ";" + subjectbody;

Email_Button.resolveNode("#event.#submit").embedPDF = "0";

Email_Button.resolveNode("#event.#submit").format = "pdf";

Email_Button.execEvent("click");

}



There is also a Email Submit Button(Email_Button), HIDDEN from layout

with Email address:xxx@xxxx.org

THANKs
6 Replies
pguerett
Level 10
Level 10
What error are you getting? If you are using Acrobat hit Ctrl-j when the form is rendered and you will see if the code is generatingn an error in the javascript console. are you getting the messageBox to appear?
Not applicable
Hi Paul,

In the console here are the only one I can see:

Acrobat EScript Built-in Functions Version 9.0

Acrobat Annotations / Collaboration Built-in Functions Version 9.0

Acrobat Annotations / Collaboration Built-in Wizard Functions Version 9.0

Acrobat SOAP 9.0



My script works till: You are about to Email.. and then does NOT

execute for some reason the Event Click for the Email_Button!

I am not getting any message!



Thanks
pguerett
Level 10
Level 10
Do you have a mail client on your machine?
Not applicable
microsoft outlook.



Thanks
pguerett
Level 10
Level 10
Can you post the form to livecycle8@gmail.com and I will have a look.