Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to scroll content, leaving navigator stationary

Status
Not open for further replies.

TomTo

Technical User
Nov 8, 2006
6
US
I have a long article with a number of subheadings that I wish to display on the web. I have put this article in a table with the table of contents—the sub heads—in a column on the left to act as a navigator. Of course, when one scrolls down the article one loses sight of the navigator.

I know how to solve this by putting the navigator and the content in two frames. But I have been asked to avoid this. I see two other possible solutions but can’t implement them.

One, I could instead put the navigator in a top row and the content in a bottom row of a table. I thought it would be possible to have a scroll bar for only the content, leaving the navigator visible on the top. Then a person could choose various sub heading links to explore those parts of the article or just scroll down. Is this possible?

Two, I have made the navigator into a small pop up window. The idea is that one could choose the links in that window which would then force the content page to go to that sub head. I can make it do that but only by having that link either open up a brand new window to that particular sub head or go to the top of the already opened page. I want it to go back to the already opened page and to the sub heading. Any ideas?

Thanks,
Tom
 
I want it to go back to the already opened page and to the sub heading. Any ideas?

To link to a particular place on a page, give that item an id attribute.

Example:
< h1 id="third_heading">Third Heading< /h1>

Then on your link add a # symbol and the id name.

Example:
< a href="other_page.html#third_heading">Link to third heading on other_page.html< /a>

< a href="#third_heading">Link to third heading of this page< /a>
 
There are ways keep the navigator visible as the page scrolls down using CSS, but IE doesn't support them. Maybe someday Micro$oft will make a half decent, up to date, major bug free browser so we can actually use the web the way it should be. Oops, there i go dreaming again.
 
Dear Wiser3,

I tried as you suggested. In fact, I had already written (or rather GoLive had written) the code for me exactly the way you said. What this does is open up the content page in the navigator pop up page.

I think the solution lies somewhere in creation CSS Actions, but the Help in GoLive is, well, no help at all for novices. Experimenting around here is what I found.

If I use the Go Last Page action, nothing happens.

If I use the Open Window action, a new window opens right to the link I want. However, I want to go back to the already opened contents page with the link now at the top of that page.

Slide New Window does the same as Open Window.

I tried grouping Go Last Page with Go to Link, but that does nothing.

Let me try to explain what I want more clearly.

Page A has a table of two columns, one row. One column contains a long article. The other column contains a navigator with links to the many sub-headings of the article. Of course, when you click on a link, it takes you to that sub-head. But the navigator itself is now off screen, being at the top of the article.

Page B is a pop up window that contains only the navigator. The idea is that one can click on various sub heads in page B, taking one to those anchors in page A. The navigator can be to the side of the screen. Of course it will get covered up every time a link to page A is invoked, but if one has it to the side, one can easily bring it to the top again.

But the problem is, as I described above, clicking on a link in page B either does nothing (Go Last Page action), opens page A inside page B (coding you supplied), or opens a new window that goes to that link at the top (Open Window or Slide New Window)

What I want is that the link in page B goes back to Page A at the anchor point.

Tom
 
In oder to get the page to open in a window other then the one the link is in you need have to specify the "target" window to open the page in.

Example that uses an id and sets a target:
< h1 id="third_heading">Third Heading< /h1>

< a href="other_page.html#third_heading" target="first_window">Links to third heading on other_page.html in the window named third_heading< /a>

GoLive has a place in the link inspector to set the target window.

It sounds easy but there are some issues to deal with. The biggest is that window names are case sensitive and you must name the target window EXACTLY. When a browser is first opened the window is named something like 'website name - Microsoft Internet Explorer'. If there using the FireFox browser it will be like 'website name - Mozilla Firefox'. This makes it nearly impossible to target a users default window.

If you target a window that doesn't exist a new window will be opened with that name. So lets say someone goes to your site with the navigator and content columns. They click a link in the navigator and it's target attribute opens a window named "My Sites Content". If they click another link in the navigator it opens the page in the same window as before, since a window with that name now exists. If they click a link in the content window it opens there by default, but you can have a target of "My Sites Navigation" which would open/create a window of that name.

The target attribute also has some special values:
_blank always opens page in a new window
_self always opens page in current window
_parent opens page in current frames parent
_top clears all frames and opens window at top most level
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top