Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How do I make an EXIT button work!!

New Here ,
Dec 03, 2007 Dec 03, 2007
I used javascript:window.close() in the button just as instructed to do on the adobe web site and it doesn't work. Does anyone have any suggestions?

Desperate in DC
2.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 03, 2007 Dec 03, 2007
Hi pixelcat23 and welcome to our community

Unfortunately closing the window is problematic on a number of levels and no method is 100% foolproof. There are many factors at play. Browser type, how the window was opened to begin with, etc.

The easiest way to accomplish this is to simply edit the properties for Captivate and adjust the Start and End action so that the end action is to Close the project. Then configure a button or click box to jump to the last slide. Then if it can close, it closes! If it doesn't close, JavaScript likely won't be able to close it either.

Cheers... Rick
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 18, 2008 Sep 18, 2008
Hi Rick,

What do you mean by "edit the properties for Captivate and adjust the Start and End action so that the end action is to Close the project." Edit which properties, where?

Laura
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 18, 2008 Sep 18, 2008
Hi Laura

In Captivate, if you click the Edit menu you see Preferences...
Click Preferences... and the Preferences dialog appears.
Click the Start and End node inside the Project node.

Once you are there you should see what I'm referring to. There is a drop-down selector that allows you to choose the action when the project finishes playing.

Cheers... Rick
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 03, 2007 Dec 03, 2007
What I do is place a javascript CLOSE window function in the HTML page that plays the .SWF file. In Captivate, I create a button and tell it to execute that Javascript function, by name. That way, the user does not get a confirmation window, asking for permission to close the browser window. Working for me since Captivate 1....
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 08, 2008 Jan 08, 2008
I have had the same issue with my LMS. We ended up creating an image button and using the javascript:window.close(); command under Button Properties. The easiest way to make this work in Captivate 3 is:

1. Click on the upside down triangle just to the right of the Javascript code box on the button properties screen.
2. Choose "top" (this will indicate that you are trying to close the top window and will close the browser).
3. Test your project.

If this doesn't work, we also had luck by making changes to the standard.js file under c:\program files\adobe captivate 3\templates\publish. Right-click on standard.js and choose "edit". Copy the following code and paste it on the bottom of the file:

function closeBrWindow()
{
var ie7 = (document.all && !window.opera && window.XMLHttpRequest) ? true : false;

if (ie7)
{
//This method is required to close a window without any prompt for IE7
window.open('','_parent','');
top.window.close();
}
else
{
//This method is required to close a window without any prompt for IE6
this.focus();
self.opener = this;
self.close();
}
}

Next, in Captivate 3, add a button and double-click to set the button properties. On the “Button” tab, in the section “If the user clicks on the button” in the drop-down box for “On success:”, choose “Execute JavaScript”. Click on the ellipses button (…) below to bring up the JavaScript edit window. Enter the following line:

javascript:closeBrWindow();

Click “ok” and then “ok” again on the “Button” tab.

The "exit" button that you created should now close the browser window.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 29, 2008 Aug 29, 2008
MMDENT, your method works fine (on IE6) when the file is hosted on a server, I have tested it and it works great. Only, my captivate project needs to work on both Online and "Standalone" versions (which would consist of opening the html file that opens the swf, from a CD)

Does anyone have a javascript way that works on both server, and "Standalone"? Any help would be greatly apreciated.

I have already posted on another thread and received help from someone for another method, wich consists to insert a blank frame at the end of the document, and choosing Close Project as the action to execute at the end of the Course. But on "Standalone", it also doesnt work.

Thanks in adavance!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 29, 2008 Aug 29, 2008
You could always use a Flash wrapper program to do the CD version, carldufourm. That way you could pop up windows and close them with internal Flash commands and it wouldn't matter what browser or Javascript capability that your end user would have.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 12, 2011 Jul 12, 2011
LATEST

Hi there. I tried everything you guys posted right here...but in vain... after I create the button then when clicking on it I select the java etc...Then When I publish it nothing happens.

Help me out please.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources