JavaScript.CoolDev.Com Support Forums

Any questions related to JavaScript menu and JavaScript tree menu by Javascript.CoolDev.Com

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CoolTree nodebyid question

 
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsTree
Author Message
cjgtek



Joined: 23 Mar 2004
Posts: 4

PostPosted: Mon Sep 27, 2004 5:44 am    Post subject: CoolTree nodebyid question Reply with quote

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,
Code:
Back to top
AlexKunin
Developer


Joined: 03 Jan 2003
Posts: 1191

PostPosted: Wed Nov 17, 2004 7:35 pm    Post subject: Reply with quote

Well, using IFRAME instead of the second DIV might be a good solution.
Back to top
cjgtek



Joined: 23 Mar 2004
Posts: 4

PostPosted: Wed Nov 17, 2004 8:28 pm    Post subject: Reply with quote

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

PostPosted: Wed Nov 17, 2004 9:38 pm    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsTree All times are GMT
Page 1 of 1