I need a very simple Adobe Acrobat JavaScript action created for a button. The function of the button is to SUBMIT a pdf form that has required text fields to an email address and then Open a Web Link to a specific url (web page). Therefore the SUBMIT button must first validate the required fields before it can email the completed pdf and jump to the url. I want to apply this JavaScript as an "Action" in "Run a JavaScript" in Acrobat v9.0
I have a JavaScript file (attached) for referrence, that validates the required fields in a pdf form and then emails the completed document. What I need is to add the ability to this JavaScript to open a web page ONLY after Acrobat has validated the required fields have been filled in. Therefore if one of the required fields is NOT filled in, Acrobat will provide an error message - the pdf form will NOT be emailed - and the JavaScript to Open a Web Link will not occur. However if all of the required fields are filled in - the pdf form will validate successfully and me emailed - and finally the JavaScript will Open a Web Link.
I have attached a zip file with an Acrobat JavaScript and a test PDF to test.