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

[Solved] ajaxmanager has no properties

2 Answers 96 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Leon
Top achievements
Rank 1
Leon asked on 09 Apr 2008, 12:09 AM
i have the following code in place
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">  
    <AjaxSettings> 
     <telerik:AjaxSetting AjaxControlID = "RadAjaxManager1">  
      <UpdatedControls> 
        <telerik:AjaxUpdatedControl ControlID ="GridAct" /> 
      </UpdatedControls> 
     </telerik:AjaxSetting>            
    </AjaxSettings> 
    </telerik:RadAjaxManager> 
 
function refreshTasks()  
      {  
                var ajaxManager = $find("RadAjaxManager1");  
                ajaxManager.AjaxRequest('RebindTasks');  
      }  
 
Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest  
        If e.Argument = "RebindTasks" Then  
            GridAct.Rebind()  
        End If  
    End Sub 

but when i run the code, it give me the following javascript error
"ajaxManager has no properties"
when am I missing?

2 Answers, 1 is accepted

Sort by
0
Leon
Top achievements
Rank 1
answered on 09 Apr 2008, 05:56 AM
Leon,

Perhaps the manager resides in a master/content page or just in a naming container? If so, a bit different syntax must be used. Something like

$find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>")

Look at the docs here:

http://www.telerik.com/help/radcontrols/prometheus-futures/ajxAjaxMasterPage.html

Regards,
-Leon :)
0
Leon
Top achievements
Rank 1
answered on 09 Apr 2008, 09:29 PM
Thanks for the reply
I have figout the problem now
I have to force the JS to run on the server
so the follow code will fix it, for further reference
<div id="DivJS" runat="server">  
    <script type="text/javascript">  
      <!--        
       function refreshListing()  
       {  
        var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");  
        ajaxManager.AjaxRequest('RebindListing');  
       }  
      -->       
    </script> 
    </div>       
Tags
Ajax
Asked by
Leon
Top achievements
Rank 1
Answers by
Leon
Top achievements
Rank 1
Leon
Top achievements
Rank 1
Share this question
or