Captivate 2019, Windows 10, HTML5 output only.
Have a Text Entry Box with the Enter key as a shortcut. Would like to execute a JavaScript function when the user presses the Enter key. It is possible to do so when the answer is correct (on success), but need to be able to execute it when the answer is incorrect as well. The JavaScript evaluates whether the answer is correct or not and then shows/hides several assets on screen accordingly. Need to be able to still edit the Text Entry Box after executing the JavaScript.
Thank you.
As long as you do not have Infinite attempts the TEB has a Success and Failure event, at least if it is validate. Not completely sure that is the case. Any event can launch any command from the dropdown list, including Execute JavaScript. Maybe learning first about the basics of the TEB could help?
http://blog.lilybiri.com/text-entry-boxes-back-to-basics
What you cant to do would be very easy with advanced or shared actions.. but you want JS.
You must be logged in to post a comment.