Solved

Document navigation

Posted on 1998-09-08
1
160 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
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

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

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 discusses four methods for overlaying images in a container on a web page
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

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

19 Experts available now in Live!

Get 1:1 Help Now