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

RadAjaxManager.ResponseScripts() does not fire javascript after ajax event

1 Answer 341 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Jim
Top achievements
Rank 1
Jim asked on 05 May 2009, 11:17 PM
I have an issue that javascript is not fired when AjaxManager.ResponseScripts.Add("updateSummary();") is executed from the NodeExpand() event in a RadTreeView Control.

Protected

 

Sub RadTreeViewProducts_NodeExpand(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles RadTreeViewProducts.NodeExpand

 

    ' Deleted adding nodes to treeview
    RadAjaxManager1.ResponseScripts.Add(

"updateSummary();")

 

 

End Sub

updateSummary() is a valid javascript function on the page.

I can successfully use the same ResponseScripts() call in an AjaxManager_AjaxRequest event, but not the NodeExpand event of the RadTreeView.

I am using RadControl for ASP.NET AJAX Q3 2008.

Any suggestions?

Thanks.

 

1 Answer, 1 is accepted

Sort by
0
Todd Anglin
Top achievements
Rank 2
answered on 06 May 2009, 05:14 AM
Jim-

Is your NodeExpand event ajaxified with RadAjaxManager? The ReponseScripts will only work after an ajax event, so make sure that your event is ajaxified.

Otherwise, your approach looks okay. I don't see any problems with your syntax. You may consider using FireBug in FireFox to do more script debugging and ensure no other JS errors are occuring after your NodeExpand that could be causing your updateSummary to fail. Let me know if this helps.

-Todd
Tags
Ajax
Asked by
Jim
Top achievements
Rank 1
Answers by
Todd Anglin
Top achievements
Rank 2
Share this question
or