This is a migrated thread and some comments may be shown as answers.

[Solved] Subscribing to onChange in javascript

2 Answers 49 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Robert Wilczynski
Top achievements
Rank 1
Robert Wilczynski asked on 10 Apr 2010, 05:10 PM
Hi,

I need a way to react to numeric text box value change client side but I can't use.

.ClientEvents(events => events.OnChange("changeHandler"))

since the control is in an editor template that will produce multiple instances that should have (or not) different handler.

I would like to do that in java script using something like:

$(#number).data("tTextBox").changed(function() { ... })

Is client side changed event subscription supported and if so how can I make it happen (any workarounds)?

2 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 12 Apr 2010, 09:23 AM
Hello Robert,

You can achieve your goal with the following code snippet:

$('#numeric').bind('change', changeHandler);

Regards,
Georgi Krustev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Luke jj
Top achievements
Rank 1
answered on 26 Jun 2010, 08:56 AM

Hi,

adding changing event that way is ok. But I have scenario that after increasing value I making ajax request to save it.

And when I try to type directly in numerictextbox more than 2 numbers it's not possible. Because after first dig it's making request. Is there easy way to prevent firing event after some delay in milliseconds?

Tags
NumericTextBox
Asked by
Robert Wilczynski
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Luke jj
Top achievements
Rank 1
Share this question
or