Solved

Need to create a link between a nodal tree and the page that's displayed

Posted on 2006-11-22
2
205 Views
Last Modified: 2010-04-09
Greetings,

I have the attached frame working okay, but need to:

1) display a different page in the right frame when the user clicks on a different node in the tree I am displaying on the upper left frame.
2) move to a different point in the page in the right frame depending on the node that was selected.

Can anybody give me a few line of code for that?

Thanks,
newbieweb

/// main page

<HTML>
 <HEAD>
  <TITLE>TreeView Demo: JavaScript Functions</TITLE>

 </HEAD>

 <FRAMESET cols="200,*" onResize="if (navigator.family == 'nn4') window.location.reload()">
  <FRAMESET rows="*,100">
   <FRAME src="leftFrame.html" name="index">
   <FRAME SRC="lowerLeftFrame.html" name="glossary" SCROLLING="yes">
  </FRAMESET>
  <FRAME SRC="rightFrame.html" name="main">
 </FRAMESET>

</HTML>


// left frame page

<html>
<head>
<title> Sample Tree </title>
<script type='text/javascript' src='mktree.js'></script>
<link rel="stylesheet" href="mktree.css">
</head>
<body>
<p>
<ul class='mktree' id='outer'>
  <li>One</li>
  <li class='liClosed'>Two
    <ul>
      <li>Uno</li>
      <li>Dos</li>
      <li>Tres</li>
    </ul>
  </li>
  <li>Three</li>
</ul>
</p>
</body>
</html>
0
Comment
Question by:newbieweb
2 Comments
 
LVL 12

Accepted Solution

by:
enachemc earned 500 total points
ID: 18001411
//Left Frame

<html>
<head>
<title> Sample Tree </title>
<script type='text/javascript' src='mktree.js'></script>
<link rel="stylesheet" href="mktree.css">
<script language="Javascript">
      function nav(right, lower){
            window.top.frames['main'].location="rightFrame" + right + ".html";
            window.top.frames['glossary'].location="lowerLeftFrame.html#link" + lower;
      }
</script>
</head>
<body>
<p>
<ul class='mktree' id='outer'>
  <li>One</li>
  <li class='liClosed'>Two
    <ul>
      <li onClick="nav('1', '1')">Uno</li>
      <li onClick="nav('2', '2')">Dos</li>
      <li onClick="nav('3', '3')">Tres</li>
    </ul>
  </li>
  <li>Three</li>
</ul>
</p>
</body>
</html>


//lowerLeftFrame.html
lowerLeftFrame.html
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<a name="link1"></a>link1
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<a name="link2"></a>link2
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<a name="link3"></a>link3
0
 

Author Comment

by:newbieweb
ID: 18003683
thanks.  works great!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now