facebook

giving focus

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #334213 Reply

    SonamGyato
    Member

    after transitioning to a new page, i’d like to give one INPUT
    element the focus – i.e. have the input keypad pop up automatically.

    How can I do this?

    #334214 Reply

    Hi everest,

    Doing a quick research I found this question in stackoverflow that states this is not possible: http://stackoverflow.com/questions/6837543/show-virtual-keyboard-on-mobile-phones-in-javascript/6837575#6837575

    #334222 Reply

    SonamGyato
    Member

    i was able to do it.

    in the post transition method – after the page is built and displayed.

    setTimeout( function ()
    {
    document.getElementById(“id”).focus();
    }, 250 );

    the input field is given focus and the keyboard pops open.

    #334229 Reply

    WaylandDavis
    Member

    Well done. Thanks for reporting it to all of us.

    #334234 Reply

    support-michael
    Keymaster

    Nice!!! I 2nd wildwex compliment.

    #350472 Reply

    EricRae
    Participant

    So… I love this hack. It works in the Mobile Sim.. but it doesn’t appear to work on either IOS or Android (anymore??).

    Have you guys seen the same here? Any ideas how to get this to go these days?

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: giving focus

You must be logged in to post in the forum log in