Solved

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

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

706 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

15 Experts available now in Live!

Get 1:1 Help Now