Updating a Webobject

Feb 25, 2013

Is there a way to update a web-object without opening Storyline? I try updating the source files directly in the folder that Storyline is using on my link, but it is not picking up the latest versions and still using the older versions of the web-objects.

We use a lot of web-objects and we go to a lot of iterations, the best for us will be updating the source files directly without the need of having to open storyline, delete the existing web-object, upload the new one, re-size and re-position and publish the document again. All this currently has to be done manually. The links to the files and names of the same are not changing, only the code.

8 Replies
Francisco Carreon

Yes, I have clear the cache in the browser but when publishing again still uses the old files. I guess there is a cache that get's created in Storyline the first time you upload the web-object and unless you remove the object and re-uploaded this cache is not been reseted. I hope one of the developer could explain more in detail how storyline handles this..

John Morley

I see this is nine years old, giving me all the more hope a solution has been found.

I assume (risky, I know) that part of the charm of an embedded web object is that when the source is updated, the presentation is also updated. This is not working for me.

As the attached shows, the single slide presentation calls a folder on my local hard drive named "Table Web Object," which contains an index.html file.

Works fine.

But when I update the index.html file, the presentation continues to show the old information, despite refreshing, relaunching, or anything else I know a learner could try. Are we just stuck with this or am I overlooking something?

Any enlightenment would be appreciated.

Math Notermans

With Javascript you can update and manipulate WebObjects.
Simply stated you replace the source of the WebObject with some other source.
You do need to ensure its a safe source... thus 'https' else you get errors..

let newSrc = result[0].url.replace("http://", "https://");

Also you need to make sure you got the proper element selected... here i use a specific 'data-model-id' i checked on publishing. And make sure i got the proper window selected and then change the source to the URL i have. Ofcourse this needs to be publicly available.
I am using an attribute selector ( 'data-model-id' ) because that appears to be the only solid way to select a WebObject by code. Using acc-names as i prefer often, doesnot work.

let WebObject = document.querySelector('[data-model-id="6U1OA6sSeOT"] > div > iframe');
       gsap.to(WebObject ,{attr:{src:newSrc}});

A trick i using at the moment is setting the data-model-id to a easy recognizable one when the Storyline starts.

let myWebObject = document.querySelector('[data-model-id="6U1OA6sSeOT"]');
myWebObject .setAttribute("data-model-id", "webO_01");

All this is based on online use ofcourse. Testing now if it works with local folders too...
And it does... so thats nice... sharing the setup.

When publishing this online...you need to put the folders somewhere online and change the URL.
Also when testing this locally...ensure your local url to the path of your folders is correct.