Skip navigation
Currently Being Moderated

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

Apr 4, 2012 8:58 AM

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.

  • Currently Being Moderated
    Apr 4, 2012 10:09 AM   in reply to jaloren28


    take a look at alert.


    alert is the javascript function.

    Alert is the FrameMaker function



    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points