9 Replies
Erwin Ancheta

Thanks Matthew.

I saw the errors. It seems like the course can't access the link outside the moodle server:

Uncaught DOMException: Blocked a frame with origin "https://s3-us-west-2.amazonaws.com" from accessing a cross-origin frame.

Failed to load resource: the server responded with a status of 403 (Forbidden)
VM1129:7 name; undefined
custom.js:28 script added

Does this mean that javascript webobject links should be hosted in the LMS?


Matthew Bibby

That's as I expected. 

Rather than hosting the web object on AWS, add it directly to your course.

So, let's say you have a folder called MyWebObject that contains your index.html file along with any other files needed in the web object.

Simply select the MyWebObject folder when adding your web object rather than adding the link to AWS. Then publish and upload and it'll work. 

Erwin Ancheta

Hi Matthew,

Thank you for your patience.

Done that Sir :(  please see screenshot.

I also tried hosting the map in my localhost (Xamp) then preview it in my local moodle. Please see screenshot.

I hope we can find a solution for this :(


Matthew Bibby

As I'm sure you can appreciate Erwin, it's tricky to troubleshoot without the files!

Based on the description you've provided, you may not need JS to achieve this. You can just use triggers on Area A that change Area B from a disabled state to a normal state (which will make it clickable once Area A is complete).

Erwin Ancheta

Hi Matthew,

I appreciate your help but the raw files can't be shared :(

I understand your advice to just use triggers. With the client's requirement it will not work. We are using a custom map (draggable, with cloud animations etc.). Please see screenshot. This can't be done in SL alone.

Can you make a SL sample that has the same requirement?

  • Javascript map linked on webobject
    • Condition: When Area A is complete, then Area B will be clickable.
  • Compiled as SCORM

This can really help us resolve the issue.

Thank you in advance Matthew.


Matthew Bibby

Hi Erwin,

No, sorry, I don't have the capacity to create that sample for you.

The error you received, Uncaught DOMException: Blocked a frame with origin "https://s3-us-west-2.amazonaws.com" from accessing a cross-origin frame occurs because you are trying to run a script from one place (AWS) and have that communicate with another (your LMS).

This is why I suggested adding the web object directly to Storyline rather than hosting it on AWS.

An alternative way to solve this is to use window.postMessage() to send messages between the web object and Storyline. This will help you avoid the same-origin policy issue.