on text change of a text box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anudu
    New Member
    • Oct 2007
    • 31

    on text change of a text box

    I am developing a system with asp.net(c#) and javascripts. I want to call a javascript method when the textbox text is changed. I tried onkeypress event. it works successfully . but if the user copy and past a value in the text box, the method is not called.

    help me to solve this.
  • DrBunchman
    Recognized Expert Contributor
    • Jan 2008
    • 979

    #2
    Hi anudu,

    You can use the javascript ontextchanged event. This will fire if the content has changed when the textbox loses focus (e.g when the user hits tab or return or clicks out of the textbox).

    Hope this helps,

    Dr B

    PS Just so as you know, this is a classic ASP forum. Any questions you've got about C# or ASP.NET should go in the .NET forum.

    Comment

    • anudu
      New Member
      • Oct 2007
      • 31

      #3
      Originally posted by DrBunchman
      Hi anudu,

      You can use the javascript ontextchanged event. This will fire if the content has changed when the textbox loses focus (e.g when the user hits tab or return or clicks out of the textbox).

      Hope this helps,

      Dr B

      PS Just so as you know, this is a classic ASP forum. Any questions you've got about C# or ASP.NET should go in the .NET forum.
      Thank you for the help. I will put it in .net area.

      Comment

      Working...