 |
 |
Logistical problem with a menu in a frame.
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status:
Offline
|
|
Two frame layout, the menu in the top frame sends a variable to the bottom frame in a url, targetting the bottom frame, the bottom frame changes (good).
However I also want the menu to react to the variable as well, to be able to show which area of the site the visitor is at.
(php, global variables off)

|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Nov 2004
Location: Stockholm, Sweden
Status:
Offline
|
|
rather than frames, why not just use a top div for the menu (static, if need be), with another for the content? then you can use something like this in your css file:
Code:
body#active1 ul#topnav li#1 a,
body#active2 ul#topnav li#2 a,
body#active3 ul#topnav li#3 a,
body#active4 ul#topnav li#4 a,
body#active5 ul#topnav li#5 a,
body#active6 ul#topnav li#6 a {
border-top: 1px solid #9a9d9f;
border-left: 1px solid #9a9d9f;
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
background-color: #b6b6b6;
color: #000;
}
with your body tag reflecting the active page, like this:
Code:
<body id="active1">
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status:
Offline
|
|
Thanks Phil, but I'm trying to avoid such a drastic reworking.
I screenshotted a flash menu that I had made (you have have passed through a certain thread of mine entitled "flash menu from hell") and made a css/javascript/php carbon copy. My plan was to throw it into the top frame and disappear to the other side of the world.
Unfortunately, I'm having a heck of a time trying to pass the variable to both frames. (The flash menu jumped around on it's own timeline)
It's probably burnout.
*goes back to googling*
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status:
Offline
|
|
Hrmm... so instead of just using a normal link with a target, could you use javascript (for example) to change the locations of both frames? Then all you'll need to do is make the menu frame respond to get parts of the url... So the variable can be passed like you'd be familiar with in PHP ( http://www.meh.com/index.php?variable=whatever). It's more difficult to extract that with javascript than you would with PHP, but it's not difficult.
If you want, I'll expand on the above...
|
|
Just who are Britain? What do they? Who is them? And why?
Formerly Black Book
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status:
Offline
|
|
Originally posted by Black Book:
Hrmm... so instead of just using a normal link with a target, could you use javascript (for example) to change the locations of both frames? Then all you'll need to do is make the menu frame respond to get parts of the url... So the variable can be passed like you'd be familiar with in PHP (http://www.meh.com/index.php?variable=whatever). It's more difficult to extract that with javascript than you would with PHP, but it's not difficult.
If you want, I'll expand on the above...
That was exactly the direction I was heading for Black Book, thanks, but as an update my development PC just packed a sad in a big way (again), so it's going to be making apologies from my trusty iBook and .......run.
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status:
Offline
|
|
In fact, have you got a link to the current state of the site? I'm presuming that it's clicking on the menu that dictates what goes in the other frame? If so, then the menu can just adjust itself accordingly, no?
If the bottom frame can have its content changed by other sources then the above runs into some problems. However, if it's just that the user will navigate (from google, for example) to a certain part of the site showing both the menu and the page below it for the first time, then you can handle that rather easily. In the top of the frameset just check the url of the main page and update the menu accordingly. Assuming you are using a frameset and not a normal page with an iframe (which wouldn't make much of a difference, really).
I'm badly hung-over - so sorry if none if that makes sense.
|
|
Just who are Britain? What do they? Who is them? And why?
Formerly Black Book
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status:
Offline
|
|
Originally posted by Black Book:
IIf the bottom frame can have its content changed by other sources then the above runs into some problems.
Both frames react to different input, clicking on a nieuws link makes the menu show that it is news page, and the bottom frame (content) well, shows the news.
I was however half way through making menu's for a non-frames menu when my development PC died (not recognising the hard drive), it's not looking fixable.
I've also run out of time, heading to the other side of the world in two days and making a recording inbetween.
I've pm'ed you a link to a demo version of the site, it shows the flash menu I was trying to emulate,
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|