Highlighted

Need Basic Help with moduleReadyEvent

New Here ,
Jul 10, 2019

Copy link to clipboard

Copied

I can't get the moduleReadyEvent to fire. I know I'm doing something stupid, but I've been fussing with this for hours now and could really use some help.

I'm on Captivate 11.0.1.266, publishing as HTML5 only.

This code is on my first slide, using an On Enter action.

The time shows in the console (10:34 am), so I know the code works.  The success message never appears.

window.addEventListener("moduleReadyEvent", function evtFunc(evt)

{

console.log("success");

});

console.log("10:34 am");

What am I missing?

To address the moduleReadyEvent... try this...

window.addEventListener("moduleReadyEvent", function(evt)

{

    var interfaceObj = evt.Data;

    var eventEmitterObj = interfaceObj.getEventEmitter();

},

console.log("success")

);

Views

165

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Need Basic Help with moduleReadyEvent

New Here ,
Jul 10, 2019

Copy link to clipboard

Copied

I can't get the moduleReadyEvent to fire. I know I'm doing something stupid, but I've been fussing with this for hours now and could really use some help.

I'm on Captivate 11.0.1.266, publishing as HTML5 only.

This code is on my first slide, using an On Enter action.

The time shows in the console (10:34 am), so I know the code works.  The success message never appears.

window.addEventListener("moduleReadyEvent", function evtFunc(evt)

{

console.log("success");

});

console.log("10:34 am");

What am I missing?

To address the moduleReadyEvent... try this...

window.addEventListener("moduleReadyEvent", function(evt)

{

    var interfaceObj = evt.Data;

    var eventEmitterObj = interfaceObj.getEventEmitter();

},

console.log("success")

);

Views

166

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Advocate ,
Jul 10, 2019

Copy link to clipboard

Copied

How about trying this method...?

$(document).ready(function() {
console.log("success");
});

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Advocate ,
Jul 10, 2019

Copy link to clipboard

Copied

To address the moduleReadyEvent... try this...

window.addEventListener("moduleReadyEvent", function(evt)

{

    var interfaceObj = evt.Data;

    var eventEmitterObj = interfaceObj.getEventEmitter();

},

console.log("success")

);

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Jul 10, 2019

Copy link to clipboard

Copied

Brilliant, this totally worked.  Thank you!!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Gaanf LATEST
Engaged ,
Jul 15, 2019

Copy link to clipboard

Copied

Strange to me that you got it to work by running that code in an 'OnEnter' action on the first slide.

My understanding was that it has to be ran from index.html or some external js file as the moduleReadyEvent fires long before any OnEnter action gets triggered?!

Maybe some js guru can chime in and explain?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Resources
Captivate User Guide
New Group