Hi,
I have Acrobat 9/10 documents distributed to send Form data to a sharepoint server (Via the Acrobat Readers "Purple" Submit Form button). Many of my users fill the form in and then click X (exit).
I have some javascript which executes in the "Document Will Close" section and detects if the document is "dirty". If it is I prompt the user if they want to submit the data. If they do I want to Submit the form exactly as the "Purple" button does it.
I have tried everthing I could find on the Web and had no luck (see below, it never gets to the second alert). Does anyone have any ideas on how to execute the "Purple" Submit Form button?
Thanks.
if (this.dirty) {
var nRtn = app.alert("Entered data not saved. Do you want to save your entered data?",1,2,"Test");
if (nRtn = 1) {
this.dirty = false;
this.requiresFullSave = false;
this.SubmitForm("http://192.168.0.1/test#FDF",false,false);
app.alert("Test Prompt",1,2,"CompleteGP");
}
}
Hope this can help.
Max Wyss.