Referring URL

Feb 23, 2015

I'm using Storyline 1, and I'd love to be able to capture the referring URL on the first slide and the jump to that URL when the user clicks the "Next" button on the final slide.  Is there any way to capture the referring URL?  

3 Replies
Sharon Huston

I'm not sure I understand -- are you saying you want to go back to the first slide?  Or go back to whatever page originally served up your Storyline?

The first option is pretty easy to accomplish with triggers -- select the button, and add a trigger to go back to the first slide.

The second option would be more complicated.  The easiest workaround would be for your HTML link to the Storyline file to have a target="_new" option, which would open Storyline in a new tab/window.  On your last slide you can inform the audience that it's safe to close this tab/window, and then when they close they'll be back where they started.  

You could also make your button execute JavaScript.  Your script would have to 1) get the URL of the referring page, probably using document.referrer, and then 2) you'd have to redirect the browser back to the referring page.  I'm still a JavaScript baby, so I can't give you a full example, but maybe this will get you started. 

Randy Hunt

Sharon --

Thank you for the reply.  Yes, it is the latter option that I'm looking for.  My users will click a link to get to the Storyline material, and I want to return them to the URL where they were when they initially clicked the link.  I hadn't thought of the Javascript possibility.  I've done almost nothing with Javascript, so I'll have to see what I can do!  Thanks for the idea.

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