JavaScript.CoolDev.Com Support Forums
Any questions related to JavaScript menu and JavaScript tree menu by Javascript.CoolDev.Com
| Author |
Message |
cjgtek
Joined: 23 Mar 2004 Posts: 4
|
Posted: Mon Sep 27, 2004 5:44 am Post subject: CoolTree nodebyid question |
|
|
Is it possible to set up two div's on the same page for the tree and content? What I'd like to do is set it up so that one DIV contains the tree scripts and a second div for content/code. This way when a link is clicked, the content/code is displayed in the second DIV.
It sounds like nodebyid might be the way to go, but I'm a bit of javascript newbie and could use a few pointers.
Example:
| Code: | [{id:123}, 'TopLevel', null, null, {"format": {"expanded":true}},
[{id:124},'SubLevel1', 'URL', "mainbody"],
[{id:125},'SubLevel2', 'URL', "mainbody"],
.
.
.
|
| Code: | <div id="cooltree">
<script type="text/javascript">
var tree1 = new COOLjsTreePRO("tree1", MAIN_NODES, MAIN_FORMAT);
tree1.init();
</script>
<script type="text/javascript">
RedrawAllTrees();
</script>
</div>
<div id="mainbody">
.
.
.
</div>
|
Any ideas appreciated.
Thanks, |
|
| Back to top |
|
 |
AlexKunin Developer
Joined: 03 Jan 2003 Posts: 1191
|
Posted: Wed Nov 17, 2004 7:35 pm Post subject: |
|
|
| Well, using IFRAME instead of the second DIV might be a good solution. |
|
| Back to top |
|
 |
cjgtek
Joined: 23 Mar 2004 Posts: 4
|
Posted: Wed Nov 17, 2004 8:28 pm Post subject: |
|
|
| Alex_Kunin wrote: | | Well, using IFRAME instead of the second DIV might be a good solution. |
This would work for IE users, but what about Netscape and all the others? I get hits from a lot of different browsers and IFRAME doesn't work with them. |
|
| Back to top |
|
 |
AlexKunin Developer
Joined: 03 Jan 2003 Posts: 1191
|
Posted: Wed Nov 17, 2004 9:38 pm Post subject: |
|
|
| AFAIK, IFRAME is available in all browsers except NN4.x. First of all, there are not too much people who are using NN4.x. Second, older Operas (5 and 6) do not support writting to DIV. Thrid, instead of IFRAME you can use usual frames... |
|
| Back to top |
|
 |
|
|