Setting global var's

Jun 05, 2013

Hello all,

Quick question, I would like my designes to be able to set a global var on the first side

Name: urlPath

Type: Text

Value:http://www.google.com

Then on slide XXXX we are inserting video from web and for the iframe scr we want to use this global var
%urlPath% but this is not working any idea's?

Thanks

B

6 Replies
Sam Carter

Bobby Purcella said:

So in the btn trigger Jump to URL/File I would like to be able to assign this var %urlPath%


"Jump to URL" sounds like the browser is leaving the course and navigating to a new page.  If you wanted to do this, Phil's suggestion should work, but you might want the JavaScript to read:

window.top.location = url;

Or, if you want to open a new window, use Phil's technique, window.open(url)

OR... You could use the course to jump to a slide containing the web page of the URL.  You have two choices:

1 - Jump to slide

2 - Open Lightbox (a little cooler)

Both methods keep the learner squarely in the course and allow an uncomplicated return to the original slide using PREV, CLOSE Lightbox, or a button with a PREV trigger.

The web object would be an index.htm file with a JavaScript to open the specified URL either using window.location, or a frameset assigned to the URL.  This method is a little more complicated, but the user interface is more intuitive.

But sometimes... opening a new window is the right thing to do.

Sam

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