Question

there is a simple app (html + js + phonegap) and a login form with these two inputs:

<form id="loginForm">
    <input type="email" id="email" value="" class="email" placeholder="Email" >
    <input type="password" id="password" value="" class="password" placeholder="Password" >
</form>

On a samsung galaxy ace (android 2.3.6) I want to transform the return key to a "Next" key on the email input, and in the password field I want the return key to be a "Go" (now I have a "Go" on the email and a return on the password).

How can I achieve this (using html/JS)?

Important: I'm using iScrol, note that if I remove iScroll I get a "Go" key in both inputs, so in a strange way this point may be relevant.

Short info about the return key: http://www.samsung.com/us/support/supportOwnersHowToGuidePopup.do?howto_guide_seq=6402

Thank you all.

Was it helpful?

Solution 2

As stated here: question

"there is no way from JavaScript or HTML to affect the behavior of the Android soft keyboard."

I'll take this as the correct answer for now, but other answers are still welcome.

OTHER TIPS

If the problem you are facing is that after entering email the form is sent by the return key, then as you are using a HTML5 property 'placeholder' you can also use 'required' on the 'password' field, which won't allow a return action on the 'email' field to send it.

The tabindex HTML property might change the behavior of the return key.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top