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

  • Home
  • SEARCH
  • 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 7609295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:08:20+00:00 2026-05-31T01:08:20+00:00

I have a table of input fields. The form will be used by inexperienced

  • 0

I have a table of input fields. The form will be used by inexperienced users so I want to be prepared for the worst.

I have created some code that will highlight the table row as soon as it’s input field has changed. The downside here is that the code is triggered after the user has clicked outside the inputfield.

What I am looking to achieve is the following.

  • As soon as the user types in something, an even is triggered, after every digit, enter/backspace, etc. This event will highlight the table row. Later on I want to extend this function to automatically save the form locally, but I will figure out the code for that later on.
  • Secondly, it is a price form, so it would be great if the user can only type in numbers

The browsers they will be using have full html5 and css3 support, and as a JavaScript engine I use the newest version of jQuery.

PS. If there are any downsides on implmenting this please let me know also.

  • 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-31T01:08:21+00:00Added an answer on May 31, 2026 at 1:08 am

    Use the keyup event, the value of the input will have been updated by the time this event fires but you can change the value before the user blurs the element.

    Update

    You can limit the input to only numbers using a regular expression:

    //bind to the `keyup` event for all `input` element(s)
    $('input').on('keyup', function () {
    
        //replace the value of this input by only the digits in it's value
        //note that this method works even if the user pastes a block of text into the input
        this.value = this.value.replace(/[^0-9]/gi, '');
    });​
    

    Here is a demo: http://jsfiddle.net/bKsTG/1/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table containing a bunch of input fields, sort of like a
I want to allow users to create their resume online. Resume creation will have
For instance, I want to have a html form that looks like this: <table>
I have created a table that will do an AJAX search for a car
I have python code below that will loop through a table and print out
I have a html element (like select box input field) in a table. Now
TABLE bcompany companyID | cName | ... I have the input field, where user
In SQL Server 2005, I have a table of input coming in of successful
I have a table <table> <tr><td><input radio name=R1 onClick=getOtherColumnData()>first</td><td>TR1-TD2</td><td>TR1-TD3</td><td>TR1-TD4</td></tr> <tr><td><input radio name=R1 onClick=getOtherColumnData()>Second</td><td>TR2-TD2</td><td>TR2-TD3</td><td>TR2-TD4</td></tr> <tr><td><input
I have a table laid out like so: <table border=0> <tr> <td>10: <input type=text

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.