Here is the code starting with the button. Node PUB_0050 is a leaf node tied to a table record with a URL
<ext:Toolbar ID="ToolBar2" runat="server">
<Items>
<ext:Button ID="Button1" runat="server" Text="Open Node01349">
<Listeners>
<Click Handler="openNode(['AAA_ROOT','PUB_0004','PUB_0050'])" />
</Listeners>
</ext:Button>
</Items>
</ext:Toolbar>
Then we have the Javascript code to expand the nodes. A call is made to Coolite.AjaxMethods.TreePanel_ClickJS to get the URL.
function openNode(ids, i) {
i = i || 0;
if (ids.length == (i + 1)) {
Coolite.AjaxMethods.TreePanel_ClickJS(ids[i]);
var node = TreePanel1_1.getNodeById(ids[i]);
node.ensureVisible();
node.select();
} else {
TreePanel1_1.getNodeById(ids[i]).expand(false, false,
openNode.createDelegate(this, [ids, ++i]));
}
}
Here is the AjaxMethod to load the iframe witht he URL
<AjaxMethod()> _
Public Sub TreePanel_ClickJS(ByVal NodeId As String)
Dim NavigateURL As String = "/Common/Pages/WebUnderConstruction.aspx"
Dim bo As New DCPMenus(DCPUtil_ConfigSettingsWeb.DBConnection)
bo.NodeID = NodeId
bo.WhereFilter = DCPMenusDC.WhereFilters.NodeID
bo.Open(True)
If String.IsNullOrEmpty(bo.NavigateUrl) Then
Pages.AutoLoad.Url = NavigateURL
Else
Pages.AutoLoad.Url = bo.NavigateUrl
End If
Pages.AutoLoad.Mode = LoadMode.IFrame
Pages.AutoLoad.NoCache = True
Pages.LoadContent()
End Sub
If I click the button once, it does expand the tree out as intented, but does not load the iframe with the URL. If I click the button a second time, it loads the URL into the iframe like I need it to do the first time I click the button.