Skip to main content
Known Participant
December 11, 2014
Answered

javascript Exit button does not work

  • December 11, 2014
  • 2 replies
  • 824 views


I am using Captivate 7 to create a small tutorial. On the last slide of the tutorial, I have and Exit button. For the "On Success" action for Exit, I have chosen "Execute JavaScript". In the script window, I have entered

javascript:window.close()

When I execute the presentation by pressing F12 "In Web Browser", the button works fine. (A confirmation dialog appears asking me if I want to exit.) But when I Publish and then execute, the button does not work at all.

What am I doing wrong?

Please help.

    This topic has been closed for replies.
    Correct answer TLCMediaDesign

    Are you testing in IE? You might not be doing anything wrong, but your system won't allow execution of the script from alocal drive. Try adding this to the html document and see if it fixes the issue. Ths is a workaround as you can change your registry settings to allow the script to run.

    <!DOCTYPE html>

    <!-- saved from url=(0021)http://www.google.com -->

    <html>

    2 replies

    Captiv8r
    Legend
    December 11, 2014

    Hi there

    What you are doing wrong is expecting this to work without issue.

    Click the link below and check out the bit at #6 where we talk about closing the window.

    Click here to view

    Cheers... Rick

    TLCMediaDesign
    TLCMediaDesignCorrect answer
    Inspiring
    December 11, 2014

    Are you testing in IE? You might not be doing anything wrong, but your system won't allow execution of the script from alocal drive. Try adding this to the html document and see if it fixes the issue. Ths is a workaround as you can change your registry settings to allow the script to run.

    <!DOCTYPE html>

    <!-- saved from url=(0021)http://www.google.com -->

    <html>

    M. KrebsAuthor
    Known Participant
    December 11, 2014

    I do not see anything there to add---please attach or clarify.