Skip to main content
MarkD_CoolMan
Participant
May 26, 2016
Question

Move between textboxes using <Enter> instead of <Tab>

  • May 26, 2016
  • 1 reply
  • 157 views

Hello Captivate Forum,

New to the forum and new user to Captivate here.  I am assisting in the development of a course that is designed to resemble a console application used to facilitate prescription orders.  The customer would naturally like it to 'act' as close as possible to the actual application.  In the actual application, the user hits <enter> to move from line to line on the screen.  In the course, we have created a series of TEB's to represent these lines where the user inputs commands.  To meet the goal of emulating the actual application, we would like to navigate the textboxes by using <enter> instead of <tab>.

What we have tried:

Setting the shortcut for the TEB to <enter> - this seems to work for built in actions such as continue, jump to slide, etc., but does not move focus to the next TEB

Using Execute JavaScript - window.document.getElementById("Textbox1").focus();

and

function moveFocus(){window.document.getElementById("Textbox1").focus()}; movefocus();

I looked through the common JS interface (cpAPIInterface) as well and did not see any specific built in method that supported what we are trying to do, but granted I am brand new to Captivate and new to JS as well.

The closest example I have been able to find was here - https://forums.adobe.com/message/126006#126006

Any help would be great!

Thanks!

Almost forgot: Using Captivate 8

    This topic has been closed for replies.

    1 reply

    RodWard
    Community Expert
    Community Expert
    May 26, 2016

    If you want the focus to end up in the TEB you need to place each TEB on a separate slide and have the ENTER keystroke triggering an Advanced Action with one of its action lines being to jump to the slide that contains the next TEB.  Only then will you be able to have the cursor automatically positioned inside the TEB. 

    You have to "fudge" the appearance of all of the separate slides so that the user believes they are actually only on one slide when navigating around,.

    MarkD_CoolMan
    Participant
    May 26, 2016

    Thank you for the response RodWard.  I was afraid someone was going to suggest that.  It is something we have talked about as a work around, but there are a lot of text boxes on top of a lot of slides.  Doing it this way would cause a lot of extra work and over head.  We were hoping for a more efficient solution.  Are you saying there is no JS method that could meet the needs?

    RodWard
    Community Expert
    Community Expert
    May 26, 2016

    No, I'm not saying there's no method of doing this if you know how to program in JavaScript.  There probably IS a way.  But I cannot tell you what it is.