Skip to main content
Known Participant
June 15, 2015
Question

Text entry fields - regaining focus

  • June 15, 2015
  • 2 replies
  • 256 views

Hi all,

I have a technical question regarding text entry fields.....

I have a project whereby a user is required to enter a value (like a password) before going onto the next slide.

When they go to this slide, the text entry field is automatically active so that they can start typing.

BUT... if the user clicks elsewhere on the screen, I have added the functionality whereby an error box appears

stating that they have made an error, in other words they should click on the text entry field in order to start

typing in it etc.

The text field does not become active on it's own after the user has clicked on the wrong part of the screen.

The user might start typing and nothing will happen as they have not clicked on this entry field.

Is there anyway around this?

For example to create some sort of functionality maybe with javascript so that this text entry field becomes

active again and gets it's focus back?

Thanks in advance.

Keith

    This topic has been closed for replies.

    2 replies

    TLCMediaDesign
    Inspiring
    June 15, 2015

    If you are using HTML5 this will get the focus back. I execute this from the HTML page though, never tried it in a script window.

    document.getElementById("Text_Entry_Box_1" + "_inputField").focus();

    RodWard
    Community Expert
    Community Expert
    June 15, 2015

    Why don't you just tell them in the error message to "Place your cursor in the Text Entry Field and type your password" or something like that?  Why go the hard way around something when there's an easy way to do it?