Opening a Web Object with JavaScript in HTML5

Jan 12, 2016

I need to open a web object with JavaScript because I need to construct the URL for the web object based on information I'll retrieve, so I'll use JavaScript to glue together the final URL and then use JavaScript to launch the web object since you can't use variables in the simple Insert Web Object feature.

Attached is a bare-bones instance of opening a web object with JavaScript. When you publish it, it works; You see the Articulate logo in the player, but only when viewing in a browser that uses Flash.  Here is the JavaScript:

var player = GetPlayer();
var logourl="";
var oWebObject = g_oWebObjects["999"]; = "900";

I got the 3rd line from this post: 

I got lines 4 & 5 from this post: (You can't see it if you don't change the zIndex.)

As the first post above says, it doesn't work in HTML5, and later in that post a method is suggested but I can't figure out how to make it work.  Since that post has a couple of different tangents in it and is a bit old, I thought I'd start fresh.

Thanks in advance for looking and considering suggesting a solution on how to open a Web Object using JavaScript and have it work in HTML5.

7 Replies
Christie Pollick

Hi, David -- Here is some additional information that you may find useful: Comparing Flash, HTML5, and Articulate Mobile Player Output for Articulate Storyline 2, and also perhaps this thread on a similar topic, Different javascript behavior in Chrome, depending on Flash or HTML5 output. Hopefully that helps, and others are also welcome to chime in with their ideas and opinions. :)

Ryan Brown

Hello I was not sure if I should create a new post but, after searching, this was somewhat related to what I want to do. I have a course with a web object linked to an intranet page that works fine but I would like to see if I can use JavaScript to resize the internet content that is being displayed in the webobject. If it is being displayed at 100% I would like to scale it down to about 75%. Any thoughts on how I can do this using JavaScript? It goes without saying, HTML5 functionality is a must at this point.

LaRhonda Jefferson

I realize it has been some time since this last post, however, I'm still trying to get the above code to work. I've downloaded the above storyfile which works perfectly, until you change the URL to something else. I've tried a number of different urls, but I'm not getting any of them to open. I can't even get to open.

Ultimately, what I'm wanting to do is create a url by passing a a variable.

I've tried everything with no luck. Anyone have any thoughts?