Skip to main content
April 4, 2012
Question

Is there a way to exit a script based on user input?

I have a function that loops through a document doing a find and replace. To ensure an infinite loop doesn't occur, I add a counter to the function that increments up after each loop. Once the counter reaches a 1,000, the function will exit. Instead of doing a hard exit, would there be a way to prompt the user with a dialog box that says "Do you want to continue? Yes or No." ? If the user selects "Yes", then the counter is reset to zero and the function continues. If the user selects "No", then the script exits the function.

This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

Inspiring
April 4, 2012

Hi,

take a look at alert.

alert is the javascript function.

Alert is the FrameMaker function

Markus

Translate