Skip to main content
Participant
January 4, 2010
Question

Create a button that will automatically exit you out of a course

  • January 4, 2010
  • 3 replies
  • 6169 views

Hello,


My organization created a SCORM course using Adobe Captivate 4. This course does not require a quiz to mark as complete, so we would like to create a button that will automatically exit our users from the course. We've done a lot of searching but have come up with nothing. Would someone be so kind as to tell us what variable or action we use to make this function properly?


I appreciate your assistance a head of time!

This topic has been closed for replies.

3 replies

Inspiring
February 14, 2012

Here is the solution I've found, that works pretty well with LMSs such as Moodle, WBTmanager...

The trick is to link a button to an html file that contains a closing JavaScript instruction.

Create an html file that only contains that short html/JavaScript code:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <script type="text/javascript" language="JavaScript">
            parent.close();
        </script>
    </body>
</html>

Let's name this file 'close.htm' for instance.

In Captivate, link a button to this 'close.htm' file, set the URL to open in 'parent'.

Don't forget to manually add the 'close.htm' file to the .zip SCORM package prior upload on your LMS.
Tested ok in FF, IE and Chrome.

Cheers

Inspiring
January 5, 2010

If you want to create your own close button in Cp4, try this...

1) Create your button as usual.
2) In the properties, for "On success", choose "Execute Javascript".
3) Click the button that has 3 dots on it to get the edit code window.
4)  Paste this into the window: window.top.close();


It is important to know that if you publish/preview this locally (i.e. on your machine), it will likely fail to work.
This is because of the default security settings in the flash player.

Upload it to your server/LMS and try it out.
Let me know if you have any problems with it as there are alternatives.

thanks,
Russ

Captiv8r
Legend
January 5, 2010

Hi Russ

As I explained in my first link, the JavaScript solution is far from being 100% reliable.

So for anyone reading this thread and deciding to take the advice, don't be surprised if it fails. The sad fact is that there simply is no reliable way to close the window programmatically.

The only 100% reliable method I know is to click the X in the upper right corner.

Cheers... Rick

Helpful and Handy Links

Captivate Wish Form/Bug Reporting Form

Adobe Certified Captivate Training

SorcerStone Blog

Captivate eBooks

Inspiring
January 6, 2010

Rick,

You are correct in that the javascript solution does require support for javascript and would fail without.
However, the question being posed here was specifically for a Cp4 course communicating by scorm (perhaps I should have stipulated that my answer was directed to that case).

In this case, we already know that javscript is available.

The default Cp output uses javascript to activate the swf file (though there are other means available).
Plus, both scorm 1.2 and scorm 2004 require communication to the api to be via javascript.  So all of this would be futile anyway if javascript is not supported.


Note: The actual api and course do not have to have any javascript script in them (e.g. swf, html, vb script, embedded media, java compiled classes) but all communication TO the api for scorm requires javascript.  Not the case for AICC, of course, or if you are not communicating with an LMS anyway.

So yes, javascript support is needed for any javascript to work, but if you are using Cp through SCORM, then you have to be using javascript to begin with.
And if you are not in an environment that supports javascript (which would be truly surprising these days), there are alternative means to close the window, as I mentioned previously.

And just as a sidenote, I spend quite a bit of time troubleshooting eLearning courses for banks and other financial institutions.
In most cases, the issue with a window failing to close turns out to be a logic mistake (e.g. targeting the right window) and not lack of js support.
Not all of the time, but mostly.

thanks,
Russ

Captiv8r
Legend
January 4, 2010

Hi there

You might begin by looking at the link below:

Click here to view

Cheers... Rick

Helpful and Handy Links

Captivate Wish Form/Bug Reporting Form

Adobe Certified Captivate Training

SorcerStone Blog

Captivate eBooks

Participant
January 4, 2010

Hey Rick,


First of all thank you for your response. I stumbled across this article in a previous forum post. Now that information refers to the exit ("x") button within a Captivate course. What if we wish to create our own button that closes out the course? I guess my first question should really be, is something like this even possible? I apologize ahead of time for all the confusion. I am beyond new to Captivate and quite confused.

Captiv8r
Legend
January 4, 2010

Hi again

I'm a simpleton. Usually the simplest approach is to configure the project to close when finished. If it can, it will close. If you want a button to close it, insert a button that points to the last slide. Then insert a slide at the end that is super short. .1 seconds.

Cheers... Rick

Helpful and Handy Links

Captivate Wish Form/Bug Reporting Form

Adobe Certified Captivate Training

SorcerStone Blog

Captivate eBooks