Skip to main content
April 13, 2016
Answered

Open URL or File Not working in Firefox and Chrome (_blank)

  • April 13, 2016
  • 2 replies
  • 2014 views

In Captivate 8 I have created an advanced action where if the student clicks on an exit button, we present them with a pop-up web page in a new tab with a survey on it from our company website and also exit the window which was running the online course.  The problem is that it only seems to create this pop-up browser window when the student is using MS Internet Explorer.

We made sure that the pop-up blockers were turned off when we tested Firefox and Chrome, but that didn't fix the problem.  The PC's which were used to test this did have the Flash Player loaded on them for Firefox and Chrome.

I initially had my Exit command on the same action page after a number of pauses, so I tried to move it later on a different page action and added more pauses, in case it was a timing issue.

Has anyone else run into this problem where the Open URL or File does not seem to be working in Firefox and Chrome even when no pop-up blockers were involved?

I do have Captivate 9, but I cannot use that version because they made some internal changes and now my Javascript does not work correctly.  Therefore I have to stick with Captivate 8 until they fix their code base.

Thanks

Randy

This topic has been closed for replies.
Correct answer TLCMediaDesign

The reason for all of the pauses is because I thought that it might have been a timing thing where the browser window was closed before it had a chance to spawn a new browser window.

I have set displays on the screen before I click on the buttons so I know that the variables are set correctly.

When I test it our using MS Internet Explorer 11, it works fine.  When I test it in Firefox and Chrome, is consistently fails.

I no longer think that it is a timing thing.  I now believe this is a Flash / Mozilla thing where for some reason Firefox and Chrome do not allow Flash to spawn additional browser windows.  This survey is hosted at a different base URL than where the online course is being hosted, so there's that whole thing.  We are also using HTTPS (versus HTTP) for all of our URL's.

I didn't want to just send the current browser window to the new URL because I wasn't sure it the LMS would know that the course was being exited and then might not bookmark where the student was (course is using Scorm2004 version 4).

I believe that I am using the Captivate setting to tell the browser to use the Flash version of the course if the browser has access to Flash and only use the HTML5 version if it doesn't have Flash (such when using a mobile device).  Is there a setting which tells the browser to use HTML5 unless it can't and then if it can't then (and only then) use the Flash version of the course?

Thanks for your help.

Randy


Those pauses don't do anything at all. They just pause the timeline.

Your JavaScript won't do anything either. You are trying to set a Captivate variable called "cmi.exit" which doesn't exist. You should use:

SCORM2004_CallSetValue("cmi.exit", "suspend");

You should also set the nav request:

SCORM2004_CallSetValue("adl.nav_request", "suspend");

If there is an issue with a popup being opened from within Flash, I would put everything inside of an external function. You can put it in the standard.js

function myExit()

{

SCORM2004_CallSetValue("cmi.exit", "suspend");

SCORM2004_CallSetValue("adl.nav_request", "suspend");

window.open("url to your survey")

}

2 replies

August 5, 2016

Hi Guys,

I am having the same problem on a slightly different level.

I am trying to create a launch button, that launches a URL and also exits the E-Learning content.

Have used the actions built into Captivate 8 it work in IE, but not google chrome.

so this is when i found this post but can not for the life of me figure out how to implement this code correctly: can some show me where i am going wrong.

Thanks for help in advance.

TLCMediaDesign
Inspiring
August 5, 2016

You have your scripts inside of a function, but the function is never called.

remove the function and just run the script in between { }.

or at the end type: myExit(); to invoke the function.

TLCMediaDesign
Inspiring
April 13, 2016

How is the advanced action triggered?

What's in the JavaScript window?

Lilybiri
Legend
April 13, 2016

Why three Pause commands? How are the variables set up?

Maybe you are not aware of the the Preview action button: in the top right row with buttons, the first button will show the complete conditional action in a window. Would be better to show that view.

April 14, 2016

The reason for all of the pauses is because I thought that it might have been a timing thing where the browser window was closed before it had a chance to spawn a new browser window.

I have set displays on the screen before I click on the buttons so I know that the variables are set correctly.

When I test it our using MS Internet Explorer 11, it works fine.  When I test it in Firefox and Chrome, is consistently fails.

I no longer think that it is a timing thing.  I now believe this is a Flash / Mozilla thing where for some reason Firefox and Chrome do not allow Flash to spawn additional browser windows.  This survey is hosted at a different base URL than where the online course is being hosted, so there's that whole thing.  We are also using HTTPS (versus HTTP) for all of our URL's.

I didn't want to just send the current browser window to the new URL because I wasn't sure it the LMS would know that the course was being exited and then might not bookmark where the student was (course is using Scorm2004 version 4).

I believe that I am using the Captivate setting to tell the browser to use the Flash version of the course if the browser has access to Flash and only use the HTML5 version if it doesn't have Flash (such when using a mobile device).  Is there a setting which tells the browser to use HTML5 unless it can't and then if it can't then (and only then) use the Flash version of the course?

Thanks for your help.

Randy