linking to frames

A

annalea

My site has some pages that use frames and others that don't. The
frames page (kind of like the menu driven aspect) is basically a header
(fixed info, title, etc...), with a left panel for like a table of
contents that has links that when selected change the main bigger frame
on the right....

My only remaining detail to work out is how to link back to this page,
call it menu, but with a particular table of contents selection already
chosen and displayed on the right...

I am afraid that I can't explain this well enough. I'll try one more
time.

There is a kind of "generic, all-purpose" page that the "menu" page
defaults to for the right frame (the body of the page). but when a
user makes a selection on the left, the right pane is changed to
reflect the choice of the user...

What I want to do is from somewhere else on the site, allow the user to
click a link to return to that "menu" page but instead of showing the
"generic, all-pupose" page first in the right, automatically show them
a particular choice there.

When I try to link just to the page of the "choice" that I want then it
shows up without its accompaning left hand frame.... Just like a
standalone page as the page I'm linking from does not use frames..

If anyone can understand what I am trying to say/do and can point me in
the right direction I would really appreciate it.

Thanks!!!!
 
T

Trevor L.

Annalea,
Yes, I can understand as I also use frames. But I had never thought of this
aspect.

I have a side menu with entries such as
<a href="album.html" target="index_main">
where album.html is another page which opens in the main frame (named
'index_main').
By default index_main.html opens in the main frame

I think what you need to do is to pass a parameter to the side frame (call
it sidebar.html, as mine is) when calling it,
e.g. <a href="sidebar.html?page=album.html>

To extract the parameter, place this code in in the <head> section
<script type="text/javascript">
function qsobj(parm)
{
var qpairs = document.location.search.substring(1).split("&")
var qvbl = qpairs[parm].split("=")
return unescape(qvbl[1].replace(/%20|\+/g," "))
}
var page = qsobj(0)
</script>

This should mean that when a parameter is passed to sidebar.html, 'page'
will contain that parameter.

This is where I get a bit lost. You will have to get sidebar.html to load
the named page into index_main.

Yo cold try
<body onload= "location.href=page">
but I have the feeling that this won't open in 'index_main'

I am afraid I will have to leave it here. Others may be able to complete it,
or I might have a brainwave
 
S

Stefan B Rusynko

Not possible w/o all the frames built as Dynamic Frames
See http://javascript.internet.com/navigation/dynamic-frameset.html

--




| My site has some pages that use frames and others that don't. The
| frames page (kind of like the menu driven aspect) is basically a header
| (fixed info, title, etc...), with a left panel for like a table of
| contents that has links that when selected change the main bigger frame
| on the right....
|
| My only remaining detail to work out is how to link back to this page,
| call it menu, but with a particular table of contents selection already
| chosen and displayed on the right...
|
| I am afraid that I can't explain this well enough. I'll try one more
| time.
|
| There is a kind of "generic, all-purpose" page that the "menu" page
| defaults to for the right frame (the body of the page). but when a
| user makes a selection on the left, the right pane is changed to
| reflect the choice of the user...
|
| What I want to do is from somewhere else on the site, allow the user to
| click a link to return to that "menu" page but instead of showing the
| "generic, all-pupose" page first in the right, automatically show them
| a particular choice there.
|
| When I try to link just to the page of the "choice" that I want then it
| shows up without its accompaning left hand frame.... Just like a
| standalone page as the page I'm linking from does not use frames..
|
| If anyone can understand what I am trying to say/do and can point me in
| the right direction I would really appreciate it.
|
| Thanks!!!!
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top