Hi,
I'm having an issue with ASP.NET AJAX Q1 2011.
The code is very simple: I want to add a client validation function to the button save dynamically. The code is put inside JQ block
There are 2 buttons on my web form: Save & Reset (which just causes a postback). When I do postback several times, the fireBug shows that $find(buttonSaveClientID) is null.
It happens occasionally. Most time the code run ok. Sometime it failed.
Do you have any idea?
Moreover, I'm guessing that it may be caused by telerik script is not finished processing. So I do a hook:
$find(buttonSaveClientID).add_clicking(validationFunction);
and it works. Do you know how to check if telerik script is finished processing instead of such type of work around?
I'm having an issue with ASP.NET AJAX Q1 2011.
The code is very simple: I want to add a client validation function to the button save dynamically. The code is put inside JQ block
$(document).ready(function () {
// buttonSaveClientID is defined already
$find(buttonSaveClientID).add_clicking(validationFunction);
});
There are 2 buttons on my web form: Save & Reset (which just causes a postback). When I do postback several times, the fireBug shows that $find(buttonSaveClientID) is null.
It happens occasionally. Most time the code run ok. Sometime it failed.
Do you have any idea?
Moreover, I'm guessing that it may be caused by telerik script is not finished processing. So I do a hook:
for (var i = 0; i < 1000000; i++) {
if ($find(buttonSaveClientID))break;
}$find(buttonSaveClientID).add_clicking(validationFunction);
and it works. Do you know how to check if telerik script is finished processing instead of such type of work around?