These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Message box after connection error within submitForm()

muggel_mail
Registered: Oct 28 2009
Posts: 9
Answered

Hello everybody,

I submit form data by using doc.submitForm(). If the target server is online everything works as expected. The problem is that I get a message box saying "An error occured during the submit process..." in case the server is down. Is it possible to somehow disable this alert? I tried encapsulting the submitForm() call with a try-catch section but the error still is presented to the user. In my scenario its quite ok if the user is not bothered with the connection error.

A workaround would be to first check the availability of the server and then send the form data. Is that possible with the acrobat java script api?

Thanks for your help and best regards,
Thomas.

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Unfortunately no. For security reasons the Script only knows the submit failed by looking at returned data. JavaScript doesn't have this level of control. Adobe wants the user to be bothered;)

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

muggel_mail
Registered: Oct 28 2009
Posts: 9
Hi,

thanks a lot for your reply. In the meantime I found another way to achieve want I wanted.

Regards,
Thomas.