Add event listener
Hi,
I confess I have no idea of how to use event listeners. I've looked elsewhere on the intenet, but I think the syntax may be Captivate-specific. I have 20 button that all use the same Javascript code that triggers according to the buton ID clicked.
I'd like not to add this same JS code to all the buttons, because that takes a long time to add every time I modify the code a little.
Is this a good job for an event listener?
If so, could someone help me with an example that i can paste into the slide enter javascript box?
So the example goal would be something like this, to hide whichever button is clicked:
var butName = this.document.activeElement.getAttribute("id");
cp.hide('butName');
Thank you.
