Copy link to clipboard
Copied
Hello Friends,
I am using Captivate 9 to create a responsive project. My plan was to use Alert boxes to convey information to the user. I created a simple java script file and included it in the assets/js folder:
var ASBtest = function (name)
{
this.name = name;
alert(this.name + 'Created');
};
ASBtest.prototype.sayHello = function()
{
alert("Hello, I'm " + this.name);
};
I changed the index.html file to include the JavaScript folder.
In my Captivate project I have the following execute on a button click:
var mytest = new ASBtest('Billy');
mytest.sayHello();
I should see two alert windows: one when the instance is created, and then again when the method is invoked. I only see the last one in the invoked method. Why do I not get the first?
Sincerely,
Peter
Try using console.log() instead and see what you get. Captivate suppresses alerts into it's own custom message box.
Also, why are you using Prototype, are you planning on adding more methods?
Copy link to clipboard
Copied
Are you planning to test this with users?
Our learners would likely find the interruptions as an annoyance.
I'd suggest you just use an occasional 'Continue' button. When you introduce it, have the narrator state "we've paused the course, click the continue button when you are ready..."
And only add the voice the first few times, then the button alone should be enough.
Copy link to clipboard
Copied
Hi BDuckWorks,
I appreciate the suggestions. I am only doing this to test the functionality and wanted to make sure I was seeing the right reactions to my codding.
Sincerely,
Peter
Copy link to clipboard
Copied
Try using console.log() instead and see what you get. Captivate suppresses alerts into it's own custom message box.
Also, why are you using Prototype, are you planning on adding more methods?
Copy link to clipboard
Copied
Hello TLC,
Thank you for the suggestion, I give it a try. My plan was to add additional methods to the class and that is why I chose Prototype. I welcome your suggestions if there is a better way; I am very new to this.
As a side note, will you or your company be offering any training session at the November DevLearn conference?
Sincerely,
Peter
Copy link to clipboard
Copied
No, unfortunately we won't be a DevLearn, we are working on our course though.