Email script problem

Avatar

16-01-2009

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

Replies

Avatar

Avatar

pguerett

Avatar

pguerett

pguerett

16-01-2009

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

16-01-2009

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

Avatar

pguerett

Avatar

pguerett

pguerett

16-01-2009

Do you have a mail client on your machine?

Avatar

Avatar

pguerett

Avatar

pguerett

pguerett

16-01-2009

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