Skip to main content
Participant
December 20, 2006
Question

Captivate 2.0 Multiple Clicks to Exit

  • December 20, 2006
  • 3 replies
  • 634 views
After converting a project from 1.0 to 2.0, it now takes two clicks on a click box to cause an exit from the project running in an IE browser (LMS). The button calls "Javascript:var pw=window.parent;pw.opener=window.self;pw.close();" and I've tried several different variances (javascript:self.opener.parent.close();) but get the same results. The Project End Option is set to "Close Project" Help would be greatly appreciated! Thanks, Donna
    This topic has been closed for replies.

    3 replies

    February 5, 2007
    If I published to version 7 and not 8, my code for a button actually worked.
    Participating Frequently
    December 24, 2006
    dbraz90...
    You have your question marked as the answer. Is it a fact that the answer is somehow contained in the question, or did KCWedPlaza provide the correct code (which I imagine is the case(??)? Thanks -
    KCWebPlaza-5meuTi
    Inspiring
    December 24, 2006
    In your HTML page running the Captivate movie, put this code in your <head> section:
    <script type="text/JavaScript">
    <!--
    if(window.parent!=window)
    {
    window.close = function()
    {
    window.parent.close();
    }
    }
    //-->
    </script>

    In Captivate, have a button call the JavaScript function, "window.close".
    January 12, 2007
    I tried the code and it did not work, what can I do?
    KCWebPlaza-5meuTi
    Inspiring
    January 17, 2007
    Rob,
    I double-checked the code I pasted in my message - and it works in all of my Captivate 1 and 2 movies.

    I'd double-check to make sure the JavaScript is indeed copied into the <Head> section of your HTML page.
    You might also check the JavaScript function within Captivate - and make sure you're using the same function name in Captivate as is in your JavaScript in the HTML page.