Hi,
Just trying to use the Ajax manager to call a server side function from JavaScript in a user control. I followed the getting started documentation and set up the following:
JavaScript
Code in front
Code behind
I get a script error stating ajaxManager.AjaxRequest is not a function. I do find the control no problem. Any ideas?
Thanks,
Michael
Just trying to use the Ajax manager to call a server side function from JavaScript in a user control. I followed the getting started documentation and set up the following:
JavaScript
| // Gets the ASP.NET generated control ID |
| function GetClientId(controlId) { |
| var count = document.forms[0].length; |
| var i = 0; |
| var aspControlId; |
| for (i = 0; i < count; i++) { |
| aspControlId = document.forms[0].elements[i].id; |
| pos = aspControlId.indexOf(controlId); |
| if (pos >= 0) break; |
| } |
| return aspControlId; |
| } |
| // Handles the row double click event from grid |
| function onRowDblClick(sender, args) { |
| var ajaxManager = GetClientId("ajaxManager"); |
| ajaxManager.AjaxRequest("test"); |
| return false; |
| } |
Code in front
| <telerik:RadAjaxManager ID="ajaxManager" runat="server" OnAjaxRequest="ajaxManager_AjaxRequest" /> |
Code behind
| protected void ajaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e) |
| { |
| } |
I get a script error stating ajaxManager.AjaxRequest is not a function. I do find the control no problem. Any ideas?
Thanks,
Michael