Solved

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

Posted on 2006-11-22
2
216 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Tool to Build Android and iOS App 3 73
Bootstrap on PLNKR 3 28
Delete HTML table rows 12 27
Html5 string 3 20
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…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

816 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

11 Experts available now in Live!

Get 1:1 Help Now