Forum Discussion
StefanS
9 months agoCommunity Member
How can I interact through javascript with an embedded Webobject?
Hello, I am experimenting with methods for enhancing images and diagrams with contextual information on demand. (see image)
I embedded a web object (iframe) in my Storyline course, and I can now i...
- 8 months ago
Hi Sam,
Thanks for the tip!
Due to the overall structure, it was actually much trickier than I expected.
After chatting with Claude.ai for a while, I got it running perfectly with additional features I hadn't originally considered. (As I was running out of messages, I had to switch to the Pro version, but it was absolutely worth it.)If you're not a seasoned programmer, I highly recommend using Claude.ai to generate, improve, and debug your JavaScript code.
The conversations are a real joy! By sharing the console info and screenshots, I received valuable feedback and great support with working code snippets.
Adding HTML web objects and JavaScript opens up another dimension to our courses.
SamHill
9 months agoSuper Hero
You would need to use contentWindow.
// get the web object
const webobject = document.querySelector('iframe').contentWindow
// Execute function in web object
webobject.myFunction()