Closing the browser window when the Exit button is selected
Feb 10, 2016
Hi there
I am feeling challenged. I have had a bit of a browse here, but can't find what I'm looking for.
I have built a story using Storyline 2. The final slide has an EXIT button. If I publish to Web and view the story in my local browser, clicking the EXIT button will close the story. Great.
But I have uploaded it to a website and now it doesn't work. In the web page HTML (<a href>...etc), I have included "target=_blank". This means that when the link for the story is clicked, the story opens in a new window. But... the EXIT button on the last slide no longer works. And what would be really good would be if the new window closed as well. I suspect this will be a tiny snippet of Javascript code. Can anyone tell me what the code should be, and where it should be added?
4 Replies
Hi Christine
I always add the following JS trigger to the Exit button
window.close();
and it works for me.
I just found this script for 'new window' that might work as well
In your player settings do you have the course set up to open in a new window?
Thanks, Wendy. It works now. Much appreciated.
Christine
Glad you got it sorted Christine.
I can't get this to work. I've put the JS code on the button but it does nothing. I'm testing the file on the TempShare server.
function closeWin() {
myWindow.close();
}
Any ideas?
I'm using SL3, with latest updates.
This discussion is closed. You can start a new discussion or contact Articulate Support.