Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7531739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:15:15+00:00 2026-05-30T05:15:15+00:00

I have an HTML5 app running on an Android tablet with several input fields

  • 0

I have an HTML5 app running on an Android tablet with several input fields using type=number. The numeric keypad pops up as-expected when these fields gain focus.

One of these fields is collecting the customer’s social security number. Our requirements say that the field must show the full SSN when focused and dots when blurred. I’ve implemented this with two SSN fields. One is input type=password, one is input type=number and is hidden by default.

<input type="password" name="SSN_Pass" id="SSN_Pass" value="" placeholder="SSN" />
<input type="number" name="SSN" id="SSN" value="" maxlength="9" class="required number" />

I have jQuery that hides the password field when it gains focus and shows the number field. Blurring the number field copies the value back to the password field.

$("#SSN_Pass").focus(function()
{
    $(this).hide();
    $("#SSN").show().focus();
});

$("#SSN").blur(function ()
{
    $(this).hide();
    $("#SSN_Pass").show().val($(this).val());
});

The problem I’m having is that the full alpha-numeric keyboard pops up in the Android’s browser when the focus is first gained on the password field, either when clicking the input field or tabbing to it. The user has to click the now-visible number field to make the numeric keypad pop up. Even though I’m calling focus() on the SSN visible number field, the full alpha-numeric keypad stays up.

I’d like some way to tell browser to switch to the numeric keypad. I’ve tried a couple things like re-forcing focus using a brief setTimeout delay as well as trigger(‘focus’) on the field with no luck.

It’s not a show-stopper of an issue, but it would be nice to only have the numeric keypad since it would speed up data entry a bit.

Suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T05:15:16+00:00Added an answer on May 30, 2026 at 5:15 am

    It seems to me the simplest way to avoid this is to avoid having the password field at all. I think I’d probably link or span (with tabindex) or something styled to look like a field and fill it in with *s or whatever, and then the link becomes active, then replace it with the number field. Hopefully, since the link wouldn’t trigger the keyboard, replacing it with a number field and focussing that field would open the numeric keypad.

    Update: No, then that doesn’t participate in the “next” and “previous” buttons in the browser’s keypad (at least, not on my iPhone). So my backup proposal is:

    • Always have the field there, but make it very, very small.
    • Have the *s displayed next to it.
    • When the user enters the field, fill it with the real SSN and expand it, hiding the display element.
    • When the user leaves the field, clear it, make it small again, and update the display element.
    • When you need to submit the form, immediately prior to submission, fill in a hidden field or similar.

    Here’s a completely un-styled example, which works as desired on my iPhone:

    Live copy | Live source

    HTML (other fields are just for context):

    <input type="text" id="someTextField" value="Just some field" style="width: 20em">
    <br><span id="fakeSSN">***-**-****</span><input type="number" id="realSSN" style="width:1px">
    <br><input type="text" value="Some other field" style="width: 20em">
    

    JavaScript:

    jQuery(function($) {
      var ssn = "";
    
      $("#realSSN")
        .focus(function() {
          $("#fakeSSN").hide();
          $(this).css("width", "20em").val(ssn);
        })
        .blur(function() {
          var $this = $(this);
          ssn = $this.val();
          $this.val("").css("width", "1px");
          $("#fakeSSN").show();
        });
    
      function display(msg) {
        $("<p>").html(msg).appendTo(document.body);
      }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using phonegap.js with jqm to built a mobile android app. I
I have a very nice web app (HTML5, javascript,CSS) running on my website. It's
I have developed an app running successfully on all the versions of android phones
I have been developing an Android app and testing with a 1.5 AVD and
The question is simple - we have a sample / test Solr app running
I have a nice running HTML5 Website with some JavaScript. This Page is called
I have a trivial WSGI app running on pesto, mod_wsgi and Apache: def viewData(request):
Is this even possible? I have a Rails app running on Passenger and a
I have an issue in iOS with a HTML5 Offline app. My app works
I'm running an android app on the emulator. This app tries to load a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.