HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... Is there a action like setFocus
Is there a action like setFocus
  View type:
Hi,i am building a Software Simulation with CourseLab.

At some points the user has to enter ctrl+f.

That can be easily done with a action.

But after that CourseLab has to jump automatically to a TextBox where the user has to enter text. I can not find a way without setting the Focus to the TextBox manualy by the mouse of the user.

So is there a way to do something like "SetFocus(OBJ_x)" to avoid that mouseclick. Tried that in Javascript but can't get it working.

Regards
 
With javascript you'd need to add an event handler, that would probably need to be added outside of courselab in the xml that is interpreted to build the page in the browser.

Picking up a single character key or a special key (ctrl, aly, del et al) is essentially the same but you need to define which key the script is looking for.
It is much more work to get a key combination,, essentially you look for the ctrl key press and then the f.

If you can alrerady pick up the key press you want then nest more actions, with an outdent If you use METHOD on the text box to say enable input I think that changes focus to the object, If you move something over it say a 'simulated' cursor it'll be obvious that's where they do something next and fits in with the simulator idea
Subject:
Message options
No additional options