Home - Forums-.NET - FlyTreeView (ASP.NET) - How to select a node based on its value from iframe?!

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

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

How to select a node based on its value from iframe?!
Link Posted: 30-May-2009 00:03
Hi, we need to select a tree node that resides in a parent window from iframe based on its value ?!
We tried window.parent.document.getElementById(''mytree'').CFlyTreeView.getInstanceById('mytree').findByValue('tre1').select();
but does not work.
Any suggestion?
Link Posted: 30-May-2009 10:43
First, you should be able to do window.parent.document.getElementById(...)  
AFAIK, this is not permitted by default security policy of any browser
Link Posted: 30-May-2009 23:20
window.parent.document.getElementById I'm able to do this in IE but not in FF, but even thought it does not select the node even in IE.
Link Posted: 31-May-2009 01:57
Oh. I didn't notice another thing in your code.

Parent window has its one CFlyTreeView reference.
So ideally the following code should work
window.parent.CFlyTreeView.getInstanceById('mytreee')....

But I think you are trying to achieve what is forbidden in a browser.
Are you able to call functions from parent window? For me, browser just does nothing on this.
Link Posted: 02-Jun-2009 06:02
I did like that but nothing happen! it does not expanded.

BTW, there is no security problem in calling functions in the parent window for all browsers if both iframe's src and parent's url within the same domain.
Link Posted: 02-Jun-2009 06:46
Then can you define a custom function in your frame that actually performs required tasks? like CFlyTreeView.getInstanceById....