﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebTreeView - Execute JavaScript via Server-Side during TreeView's OnDemand Load</title><link>http://www.intersoftsolutions.com/Community/WebTreeView/Execute-JavaScript-via-Server-Side-during-TreeViews-OnDemand-Load/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Execute JavaScript via Server-Side during TreeView's OnDemand Load</title><link>http://www.intersoftsolutions.com/Community/WebTreeView/Execute-JavaScript-via-Server-Side-during-TreeViews-OnDemand-Load/</link><pubDate>Thu, 22 Oct 2009 05:13:52 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;May i know detail about your function or method?&lt;br /&gt;It seems you are trying to call a method from your own JS or javascript. If the Ajax request you mean is FlyPostBack request, then no wonder the script was never called. &lt;br /&gt;If i am not mistaken, during FlyPostback request, you only can call javascript with our &lt;i&gt;&lt;b&gt;InvokeScript&lt;/b&gt;&lt;/i&gt; method from server side such as &lt;b&gt;&lt;i&gt;WebTreeView1.ClientAction.InvokeScript("test()");&lt;/i&gt;&lt;/b&gt;. &lt;/p&gt;&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>Execute JavaScript via Server-Side during TreeView's OnDemand Load</title><link>http://www.intersoftsolutions.com/Community/WebTreeView/Execute-JavaScript-via-Server-Side-during-TreeViews-OnDemand-Load/</link><pubDate>Wed, 21 Oct 2009 11:37:56 GMT</pubDate><dc:creator>SAgosto</dc:creator><description>&lt;p&gt;I have a JavaScript that is loaded using LoadOnDemand. The node's children are automatically checked if their parent is checked. This is done by handling the TreeView's OnInitializeNode event as seen below:&lt;/p&gt;&lt;pre&gt;        /// &amp;lt;summary&amp;gt;
        /// Handles the Portfolio's TreeView's OnInitializeNode event
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;param name="sender"&amp;gt;Sender&amp;lt;/param&amp;gt;
        /// &amp;lt;param name="e"&amp;gt;Event arguments&amp;lt;/param&amp;gt;
        protected void treePortfolioNav_OnInitializeNode(object sender, WebTreeViewNodeEventArgs e)
        {
            // Check the node if the parent is checked
            if (e.Node != null)
            {
                if (e.Node.ParentNode != null &amp;amp;&amp;amp; e.Node.ParentNode.Checked == true) 
                { 
                    e.Node.Checked = true;
                    string jsCode = Endurance.Web.Helper.GetJSCode(string.Format("treePortfolioNav_NodeCheckChanged('{0}', null);", "treePortfolioNav"));
//                    System.Web.UI.ScriptManager.RegisterStartupScript(this.treePortfolioNav, this.treePortfolioNav.GetType(), string.Format("{0}treePortfolioNav_NodeCheckChanged{1}", this.ClientID, Endurance.Web.Helper.GetRandomNumber()), jsCode, true);

                }
            }
        }&lt;/pre&gt;

&lt;p&gt;The problem is that the script never executes probably because the TreeView is performing an AJAX request. How do I get the JavaScript to execute?&lt;/p&gt;</description></item></channel></rss>