From the course: Adobe Captivate: Extending with JavaScript

Unlock the full course today

Join today to access over 23,400 courses taught by industry experts.

Using the console to debug

Using the console to debug

- [Instructor] Something you'll inevitably come up against while writing JavaScript is making mistakes. The thing with coding in that script window within Captivate is that it's tough to narrow down what those mistakes might be. So to solve that, we're going to move code from the script window out into another file and see how we can use that in combination with the browser console to improve our coding experience. So to do this, let's start out on slide two of our project, and I'm going to click off to the side of the slide to make sure that we're looking at the properties for the slide itself. You can see in the Actions area, the On Enter is Execute JavaScript, so I'm going to open up our script window here. So what this JavaScript does is generate a random number. That's not something that Captivate can do by itself. That's why Captivate developers use JavaScript to do it all the time. Random numbers can be really…

Contents