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

Exit a JavaScript

AndrewAlb
Registered: Aug 16 2007
Posts: 97

How do I exit out of a JavaScript code. In VB you simply put 'exit sub' but I haven't found the equivalent in JavaScript. Can you please help.

Andrew D. Albrecht, MS
Solutions Developer
ING USFS

My Product Information:
Acrobat Pro 8.0999999999999996447286321199499070644378662109375, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The scripts you enter into a PDF actions like MouseUp or Calculation are not in a function and can't be returned from. You just have to write your code in blocks so that it automatically exits to the end of the code. Or put all your code into a document level fucntion that's called from the action.

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