RadAjaxManager AjaxRequest TypeError: Cannot read property 'id' of undefined
Asked Answered
S

2

5

Here's the situation:
I have a host page that loads a custom web user control. In my web control I want use javascript and a RadAjaxManager to load up a second web user control. I used this example from Telerik as my guide:
http://demos.telerik.com/aspnet-ajax/ajax/examples/manager/clientsideapi/defaultvb.aspx

However, I kept getting the following error when I would call the client-side "ajaxRequest" method on the RadAjaxManager.

TypeError: Cannot read property 'id' of undefined
Sudorific answered 6/12, 2012 at 16:9 Comment(0)
S
6

I finally figured it out!
On my parent web control I already had implemented a RadAjaxManager. So when I loaded up my second web control with its own RadAjaxManager, the javascript was getting confused as to which manager to use.

Enter: RadAjaxManagerProxy -> http://www.telerik.com/help/aspnet-ajax/ajax-ajaxmanagerproxy.html

After implementing this, my controls worked beautifully!

Hope this helps others, if not myself later down the road when I forget.

Sudorific answered 6/12, 2012 at 16:9 Comment(2)
Did you really answer your question at the exact same time you asked it?Ornithopod
@FrancisP No, I actually worked on it until I figured it out. I then posted it out here and answered it myself; exercising the "Answer your own question" option. blog.stackoverflow.com/2011/07/…Sudorific
B
10

Another reason this error can happen is not having clientIDMode="AutoID" attribute in the <pages> element of your web.config

Bronwynbronx answered 18/7, 2013 at 4:33 Comment(2)
..or if you have anything else than clientIDMode="AutoID" on your ajaxified server control.Excommunicate
And make sure that the MS AJAX extensions are installed on the production server.Stacistacia
S
6

I finally figured it out!
On my parent web control I already had implemented a RadAjaxManager. So when I loaded up my second web control with its own RadAjaxManager, the javascript was getting confused as to which manager to use.

Enter: RadAjaxManagerProxy -> http://www.telerik.com/help/aspnet-ajax/ajax-ajaxmanagerproxy.html

After implementing this, my controls worked beautifully!

Hope this helps others, if not myself later down the road when I forget.

Sudorific answered 6/12, 2012 at 16:9 Comment(2)
Did you really answer your question at the exact same time you asked it?Ornithopod
@FrancisP No, I actually worked on it until I figured it out. I then posted it out here and answered it myself; exercising the "Answer your own question" option. blog.stackoverflow.com/2011/07/…Sudorific

© 2022 - 2024 — McMap. All rights reserved.