Jump to content

Detecting text change of readonly textbox without postback

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
engr

engr

    Newbie

  • Members
  • PipPip
  • 22 posts
I have one readonly textbox and a Submit button.i need to perform some actions based on the text changed in the text box without post back(hitting the Submit button).a datetime picker is bound to the text box control which changes the value of the text box.
i am using vb.net

#2
amrosama

amrosama

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 8,671 posts
you will need to use javascript to do that. write a javascript in the page head in the form of function, then modify the textbox tag by adding this "onchange='Yourfunction()'"

#3
engr

engr

    Newbie

  • Members
  • PipPip
  • 22 posts
Sry this doesn't work in .net.
I called the function as you suggested and added the function in the header. OnTextChanged="javascript:chngText()"
This gives an error of 'javascript' is not a member.
If I call it this way - OnTextChanged="chngText()"
It gives an error of 'chngText()' is not a member.

#4
imp0steur

imp0steur

    Newbie

  • Members
  • Pip
  • 8 posts
Its a readonly textbox .. so how do u change the text?? programatically?

javascript:chngText() .. is a client side script and should used in the onchange event(client side event) ..

OnTextChanged is a server side event