I am currently working with Adobe Captivate 8 Elearning software. I have done extensive searching for answers here and abroad on many different forums and have yet to find a solution. I hope I can receive some help here.
I have been using the Execute Javascript feature within Captivate to manipulate keyboard focus and make the interactions go more smoothly. I have used the following Javascript code with great success in having keyboard focus shift to another object on screen when a button is selected.
var elem = document.getElementById('Insert_Object_Name_here');
$(elem).focus();
However, this particular code only seems to work when the elearning slide has already loaded and not when, say, I want keyboard focus on a particular slide. I have been trying different variations of the javascript focus codes offered online and changed the Execute Javascript window settings from new, parent, current, and top but have not found a solution as yet.
What additions can be added to this code to address a different slide window loading or having the focus wait 1-2 seconds before executing?
Thank you for your time.