Solved

Document navigation

Posted on 1998-09-08
1
183 Views
Last Modified: 2010-04-09
Hi there:
I have a problem with a web pages.
I have a document with two frames (left and right). The left one is a Menu and the right one is the Contents frame.

In the menu frame I would like to add a button with the next function:

When it is pusshed I would like to move the right document (can be any of the content documents) to the named anchor #information

Any help?
0
Comment
Question by:xabi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
bernfarr earned 100 total points
ID: 1837433
Assuming that you name the left document Menu and the right one Contents. Then you can add some JavaScript code behind the button that changes the href of the Contents frame.

Your button would be coded something like:
  <input type=button name=moveContents value="Get Information" onClick="MoveContent()">

and your JavaScript could be hardcoded to something like:
<SCRIPT LANGUAGE="JavaScript">
<!--
function MoveContent()
{
  parent.Contents.location.href = "http://www.contents.htm#newlocation"
}
//-->
</SCRIPT>

Note that if you simply wanted to change the #newlocation part, you can do something like:
  var cloc = parent.Contents.location; // for shorthand
  cloc.href = cloc.protocol + "//" + cloc.hostname + "/" + URL.pathname + "#newlocation";
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

732 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