Home - Forums-.NET - FlyTreeView (ASP.NET) - OnInitializedJavascript not firing

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

OnInitializedJavascript not firing
Link Posted: 13-May-2008 05:44
I have a user control that uses the flytreeview.  it uses the OnInitializedJavascript event to do an initial load of the treeview.  This object is also to be used as a webpart.

the object works fine when not being used as a web part, the event fires, the tree loads, etc..

when being loaded as a webpart the event does not fire, I have tried, several other methods (registering startup scrips etc.. to load but I am always finding I cannot access my object. it always come back null) is there another way to get my intial load done in a webpart?
Link Posted: 13-May-2008 06:58
Try to set FlyTreeView.ForceAjaxRenderer property to true.
Link Posted: 13-May-2008 07:02
Tried it, still no go. really weird.
Link Posted: 13-May-2008 07:24
Update:

I added the following in the .ascx file for the control (at the end of the page after the treeview declaration)
the script runs, however...

CFlyTreeView.getInstanceById produces 'undefined'

which produces an error when it calls loadfromroot



if (document.getElementById('').value == 3)
{ treeview = CFlyTreeView.getInstanceById('')

loadfromroot();
}

Link Posted: 20-Jun-2008 13:44
I did notice something when dealing with another control that might be helpful:  the control is being added dynamically to the page and it's missing the page initialize event, actually appears to never fire on the dynamically added webparts, maybe helpful maybe too vague, let me know.

anyway, any movement on this?
Link Posted: 20-Jun-2008 21:17
Not yet