Expand my Community achievements bar.

Email script problem

Avatar

Former Community Member
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

Avatar

Former Community Member
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?

Avatar

Former Community Member
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

Avatar

Former Community Member
Can you post the form to livecycle8@gmail.com and I will have a look.