Jump to URL/file new window opens behind in IE

Mar 10, 2015

I'm developing a course where a user will receive one of six certificates depending on the results of a quiz and their role in the company. I developed in SL1 and switched to SL2 to take advantage of the larger window when debugging triggers. I set the certificates to open in a new window and it worked well in IE on a client tablet. After publishing from SL2 the new window now opens behind the course instead of in front of it. The new tab in back is hard to see on a client tablet, and the preferred mode is for the certificate to pop up in front. How can I force IE to open a new window in front? Is this an SL2 issue or an IE issue? Any help would be appreciated.

9 Replies
Dave Fullen

Hi Steve - It's IE8 over a network on a windows machine (no internet connection). The window being already open is a possible scenario, but it's impossible for me to tell. I tried window.open with the pdf url and it works great in testing on my browser, but when they tested it in the store none of the buttons worked at all. Which makes me wonder if javascript will work for them over a network setting.

Steve Flowers

Hey Dave, 

Javascript will work but there's a problem with the Flash player, unfortunately. By default, the Flash player blocks communication between javascript and the player when running locally. It's a security feature. 

There are a few ways to work around this:

  • Run it from some kind of a web server. These can be run on local networks. An IIS or 'nix based host is pretty easy to setup. Not always possible but it will work.
  • Add the publish folder (or any parent)  to the Flash player security settings manager (Search the web for the Flash security settings manager.) This can get dicey if you're using Chrome since it uses a different player. 
  • Publish to CD and run from the EXE wrapper.

For the window focus issue, you could try over-riding the built-in popup function. By adding this to a Javascript trigger on the slide (or on the master slide), you'll be able to add stuff to it. I added a window focus call to this one:

OpenUrl=function(strUrl, strWindow, strWindowSize, strWidth, strHeight, strUseDefaultControls, strStatus, strToolbar, strLocation, strMenubar, strScrollbars, strResizable)
{
var bChrome = (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0);
var nWndWidth = parseInt(strWidth);
var nWndHeight = parseInt(strHeight);
var bUseDefaultSize = (strWindowSize.toLowerCase() == "default");
var bUseDefaultControls = (strUseDefaultControls.toLowerCase() == "true");
var bFullScreen = (strWindowSize.toLowerCase() == "fullscreen");

strUrl = ReplaceAll(strUrl, "%25", "?");

var strOptions = "";

if (!bUseDefaultControls && !bUseDefaultSize)
{
if (bFullScreen)
{
nWndWidth = screen.availWidth;
nWndHeight = screen.availHeight;

strOptions="left=0, top=0,";
}
else
{
if (nWndWidth > screen.availWidth)
{
nWndWidth = screen.availWidth;
}

if (nWndHeight > screen.availHeight)
{
nWndHeight = screen.availHeight;
}
}

if (!bUseDefaultSize)
{
strOptions += "width=" + nWndWidth + ", ";
strOptions += "height=" + nWndHeight + ", ";
}

if (bUseDefaultControls)
{
strToolbar = "true";
strScrollbars = "true";
strResizable = "true";
strMenubar = "true";
}

if (bChrome)
{
if (bFullScreen || !bUseDefaultSize)
{
strMenubar = "false";
}
else
{
strOptions += "status=1, ";
}
}

strOptions += "toolbar=" + ((strToolbar.toLowerCase() == "true") ? 1 : 0);
strOptions += ", scrollbars=" + ((strScrollbars.toLowerCase() == "true") ? 1 : 0);
strOptions += ", resizable=" + ((strResizable.toLowerCase() == "true") ? 1 : 0);
strOptions += ", menubar=" + ((strMenubar.toLowerCase() == "true") ? 1 : 0);
strOptions += ", location=" + ((strLocation.toLowerCase() == "true") ? 1 : 0);
}

g_wndLast = window.open(strUrl, strWindow, strOptions);
g_wndLast.focus();

}
Dave Fullen

I had a hunch the change to sl2 was the difference. Thank you for figuring that out. The problem is The buttons with JavaScript aren't functioning at all. You think that's a local network security issue?

Is there any way to add that parameter back in to sl2's open window trigger?

Another idea is to specify a window size - that might force IE into opening a new window on top.

Sent from my iPhone

Dave Fullen

The client’s IT guy doesn’t have access to the Security settings and the PC doesn’t have a true desktop so an EXE version won’t work either.

I decided to go low-tech, display certificates as images on slides and have the user control-P or file/print from their browser. It’s not as pretty as printing the pdfs, but it works.

This discussion is closed. You can start a new discussion or contact Articulate Support.