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

[Solved] How to access a treeView located in iFrame

1 Answer 105 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Christian Sommer
Top achievements
Rank 1
Christian Sommer asked on 11 Dec 2009, 09:46 PM
Hello,

I want' to put my treeView in an iFrame.

So I can't work with
var tree = $find('navTree')

So I'm trying to implement a function in the iFrame

function

 

getTree() {

 

 

     return $find('navTree')

 

}

and now I'm trying to access the tree from then parent object like that:

 

tree = document.getElementById(

"iFrameTreeview").contentWindow.getTree()

 

 

 

var nodes = tree.get_Nodes();

But the broser reports: tree.get_Nodes is not a function

What should I do to get Access to the tree from the parent-site?

Thanks for your support.

 

1 Answer, 1 is accepted

Sort by
0
Christian Sommer
Top achievements
Rank 1
answered on 17 Dec 2009, 12:02 PM
Hello @all:

I had to find the solution by my own.

If you're interested in - here you are:

This function has to be integratet into the treeView page.

function

 

getTree() {

 

 

     var tree = $find('navTree')

 

 

     var nodes = tree.get_allNodes()

 

 

     return nodes[0].get_treeView()

 

}


In the parent frame you've to replace
    var tree = $find('navTree')
with 
    iframeTreeView.getTree()

where iframeTreeView is the name of the iframe, where the tree is located.

Regards

Christian

Tags
TreeView
Asked by
Christian Sommer
Top achievements
Rank 1
Answers by
Christian Sommer
Top achievements
Rank 1
Share this question
or