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 887641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:15:40+00:00 2026-05-15T13:15:40+00:00

I have an <input> textbox. I wish to call a function when it has

  • 0

I have an <input> textbox.

I wish to call a function when it has been modified. The default behavior of the change event is to only trigger on blur, but I need to call my function as soon as the textbox’s text changes and can’t wait for blur.

I’m not sure the best way to do this. I thought of maybe handling keydown and then testing the value of the keyCode for a key that would modify the value. So… ignore arrow keys, etc. But that seems awkward and I don’t think I can figure out the test to make it work.

I also thought about recording the inital value and comparing to this value but then I wouldn’t be notified in the case when the value changes back to the original.

Maybe there’s a better way?

I’d appreciate any 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-15T13:15:41+00:00Added an answer on May 15, 2026 at 1:15 pm

    a combination of focus and keyup is probably your best bet. record the initial value in the focus handler, and check against the current value in the keyup handler. (the new input value, if any, is available when keyup fires).

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

Sidebar

Related Questions

How to rewrite Webconfig connection string at runtime.I have input textbox for Server,UserName and
I've recently been developing on the django platform and have stumbled upon Django Forms
I have some jquery code the creates an quantity text box. Like so <input
I have a table in which I am adding some rows dynamically and in
In my ASP.NET MVC2 application, I have a ViewModel class called UserCreateViewModel. In this
I have an SDI application written in MFC. The frame is divided into 1
How can I do that? I already have the code I'm working on but
I'm trying to reset the formatting in my RichTextBox (WinForms, not WPF). I was
I'd like to display a little popup window next to the notification area. It's

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.