There's really still no way to redirect users to a webpage?
Jun 28, 2011
At the end of my course I need to redirect users to a webpage. In the past I used a button with a link, but this pops up in a new window. When this happens, pop-up blockers wreak havoc, blocking the page and refreshing the presentation so it starts over again in a confusing mess of windows.
I simply want a new URL to load in the parent window. I've tried every one of the methods described in the forums by people claiming to have figured out how to do this with a web object and a JavaScript redirect, and while these sometimes do the trick in Firefox, they never work in Internet Explorer. None of the examples I've seen posted by people claiming to have accomplished this actually work for me in IE. (Most of my testing has been in IE 8).
There are SO many situations where it would be useful to direct users to a webpage at the end of a presentation, and it seems ridiculous that this feature isn't available. It's crazy that we have the means to embed HTML in an iframe but no way to redirect the parent window.
I feel like there has to be some magic web object JavaScript code that IE won't choke on, or some other convoluted trick I haven't thought of. If anyone has a solution I'd be hugely grateful.
22 Replies
Hi Andy,
The solution in the link below works for me in IE9:
http://mediaenglish.com/davepersofrench/?p=444
Here's the code for the index.html file that is inserted as a web object
[quote]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head><title> Sans titre</title>
<meta name="GENERATOR" content="Articulate">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<script language="JavaScript">
<!--
function na_delay_url(url, delay_sec)
{
setTimeout("top.location.href = '" + url + "'", delay_sec*1000);
}
// -->
</script>
</head><body onload="na_delay_url('http://mediaenglishonline.com/daveperso/blogdemos/linkingpart1/presentation2/player.html', 1);">
<p align="center"> </p>
</body></html>
[/quote]
When I insert that exact HTML document as a web object, it works fine in Firefox, but in IE 8 the slide just doesn't take you anywhere. If I open the index.html file directly, IE 8 throws up that warning about blocking scripts and ActiveX controls. I wonder if this is what is preventing it from working as an inserted web object. My browser security is set to the defaults, and JavaScript is definitely enabled and working.
The craziest part is that his demo actually works for me in IE 8! I'm using his exact code for my redirect web object, so I don't know why it's not working.
Hi Andy,
Are you testing your presentation locally or online from a web server? That's likely the difference between it not working on your side and working on Moxon's website.
Great point, I just came to that conclusion myself! Unfortunately, I deliver a lot of my projects on CD, which means I'm no closer to a solution.
Try using the meta tag:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Redirect Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="en" />
<meta http-equiv="refresh" content="10; url=http://www.eLearningEnhanced.com" />
</head>
<body>
You will be redirected in 10 seconds.
</body>
</html>
Unfortunately, there's no way to include a target="_top" in a meta refresh, so the destination webpage ends up being framed inside the Articulate player.
Are you locking the presentation size and window size, or are you allowing the user to resize the window as needed?
Unlocked. The goal is to send someone to a webpage at the end of a presentation, so I'm not sure how the size of the player would be a factor.
I think I could make you a small flash file to do this...
Wanna PM me the URL?
Probably not near as elegant as a custom flash file, but a possible work around is to insert your web object, then resize and position so that it fills the entire player window. This is why locked vs. unlocked matters - if you control the player size then you can make this adjustment. If you don't control the player size then you cannot make the web object fill the window.
Here is a simple example: http://db.tt/W3y2uH3
I've attached the ppt deck to this post. I've only tested this with IE8, no other browsers.
Ha! Just tried it in Chrome... First thing that happened was my pop up blocker got me, and the alignment was way off compared to IE. Oh well, thought I'd throw it out but probably not a good option
Thanks for experimenting with this! It's great that Articulate allows for embedded web objects (and makes one question why the seemingly much simpler feature I'm looking for isn't available). However, I'm really looking to boot users out of the player to a new webpage. In my case, it's a custom certificate printing page that links back to a menu of other training modules. Another use case would be a product demo that links to a purchasing webpage, or a business presentation that links to an existing resource on a company website. I can think of countless situations where it would be useful to be able to direct users from the player to another webpage without it launching in a new window and causing pop-up issues.
For the learner, it's not always a simple matter of bypassing the pop-up blocker either. At least in IE, when the pop-up gets blocked, the original window refreshes, taking the learner back to the beginning of the course, sometimes with weird playback issues related to the web object, and the whole process gets derailed.
Mr. James Kinsley, you are truly an eLearning Super Hero. Thank you SO much for scripting up that Flash file for me! It works perfectly. Your generosity is greatly appreciated and will not be forgotten.
To document our findings for future readers...
A JavaScript redirect contained in an HTML document inserted as a web object seems to be an effective solution for presentations that will be hosted on a web server. (Note that you will see alerts in IE while developing locally.)
For presentations that will be run locally (such as from a CD), Internet Explorer (since IE6) refuses to run "active content", which includes any form of script. This means that a JavaScript redirect will not execute from within the iFrame, and the presentation will simply stop (without even throwing an alert).
The solution was onEnterFrame's custom .swf file, which was able to redirect the parent window without being blocked by IE. It was inserted as a Flash Video into the presentation.
It's too bad the only workaround requires ActionScript skills, perhaps a future Articulate update will make this easier. (Or maybe James will add a customizable version of this widget to his catalog..?
)
One last note – I did discover an interesting workaround to some of my IE local security zone problems called the "Mark of the Web", but because of the iFrame scenario it wouldn't solve the redirection issue.
Thank you to everyone for the help. A huge thanks to James for volunteering your valuable time and skills.
Thanks for the kind words Andy. I took your advice and made a customizible version of this and added it to our catalog.
It's a freebie: http://elearningenhanced.com/products/redirect-widget
This tiny tool opens a whole lot of creative doors and is very much appreciated!
I agree that this is a great tool, thanks for putting it together. I tried using it and ran into a couple of problems. My first was that I am using an iframe and it opened the webpage in the iframe. Is there anyway to make it go out of the iframe and into the parent window? Second, I was unable to get it to work with chrome. I could just be doing it wrong but it worked on firefox and IE but not chrome.
Thanks for any suggestions!
Hmm I would need to create a special version that would work in iframes.....
It should work fine in Chrome, that is where I do all my initial testing...
Can you send me a link to your course where it is not working?
Thanks
Sorry for the late response. I had deleted the files and had to put them back together. When I did, it fixed the problem in Chrome (YaY) but I am still at a loss for how to change the page outside the iframe. I don't know how hard that it would be to create a special version and I don't want you to have to go through a lot of work. If there is a quick fix, however, I would love to know about it.
Thanks!
Hey Justin... I dont have a page set up with iFrames or anything... can you try this version?
Hey James, that totally worked! You really are a super hero!!! Thanks so much!!!
Thanks to everyone above who has pitched in their help. My question also involves iframes and multiple redirects.
My Storyline project has numerous hyperlinks embedded in to the project. This project is embedded in to an iFrame and when a user clicks on a link, it will either open inside of the iFrame or in a new window. I would like for the hyperlink to redirect the top or parent window that the iframe is contained in. I feel that James' solution is close however his file appears to be down and I am still in the dark about using this method with multiple links. Any advice is greatly appreciated. Thanks!
I think you have to right-click the link and select "Save as.."
This discussion is closed. You can start a new discussion or contact Articulate Support.