Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: text update

  1. #1
    New Coder
    Join Date
    Mar 2007
    Thanked 0 Times in 0 Posts

    text update

    is there a way in javascript to run a javascript code as the text in a textbox is being changed? onchange is almost onlostfocus

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Thanked 4,740 Times in 4,702 Posts
    Several ways. You could use onkeydown or onkeyup to run some code on each keydown or keyup. You could use setInterval to run the code every NN milliseconds, no matter what. You could use onpaste to capture and attempt to paste text (e.g., with the mouse) into the field. And so on.

    Maybe a more specific question would let us help you more.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts