 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
alicelouise
Joined: 06 Feb 2007 Posts: 8
|
Posted: Mon Feb 12, 2007 3:51 am Drop down menus not showing when new centre page loaded |
|
|
|
Hi,
I've set up a frameset that holds 4 frames - 3 navigation bars (left, top & bottom) and a centre window that is used to display documents. Each navigation bar includes a drop down menu based on HV Menu 5.5. For each navigation bar, the top level of the menu appears in the navigation bar frame and the drop down sub menus appear in the centre window frame.
When I first load the page, all the menus and submenus appear, but when I load a new html document into the centre window, I lose the sub menus for 2 of the navigation bars. The sub menu I can see belongs to the frame that I've defined last in the html frameset (I've swapped the frame order round and it's always the last frame defined that still has sub menus). It doesn't seem to be linked to the frame order in the onload command.
How do I fix this so I can still see and use all the sub menus?
I've used the same code for all 3 drop down menus, but as the menu settings are slightly different, the javascript files for each menu all have different names. I have not renamed the variables used within the javascript files. Is this the problem?
The html frameset itself and the onload command embedded into all my html documents are shown below.
Thanks!
<!-- ***********Frameset code********** -->
<frameset cols="122px,*" frameborder="0" framespacing="0" border="0">
<frame src="/ihd/webpage_frames/leftbar.html" scrolling="no" noresize="noresize" name="leftbar"></frame>
<frameset rows="60px,*,50px" frameborder="0" framespacing="0" border="0">
<frame src="/ihd/webpage_frames/topbar_menu.html" scrolling="no" noresize="noresize" name="topbar"></frame>
<frame src="/ihd/announcements/test.html" scrolling="auto" noresize="noresize" name="centrewindow"></frame>
<frame src="/ihd/webpage_frames/bottombar_menu.html" scrolling="no" noresize="noresize" name="bottombar"></frame>
</frameset>
</frameset>
<!-- ****************************************************** -->
<!-- ***********onload command********** -->
<body onload="javascript:{if(parent.frames[0]&&parent.frames['topbar'].Go)parent.frames['topbar'].Go();if(parent.frames[0]&&parent.frames['bottombar'].Go)parent.frames['bottombar'].Go();if(parent.frames[0]&&parent.frames['leftbar'].Go)parent.frames['leftbar'].Go()}"> |
|
PayneLess Designs

Joined: 28 Feb 2007 Posts: 890 Location: Biloxi, MS
|
Posted: Thu Mar 01, 2007 12:04 am |
|
|
|
Not sure if this will be of any help, but try putting this between your <head> tags on each page called to be loaded.:
<script type="text/javascript">
<!--
if(top==self) self.location.href="faqs.html";
//-->
</script>
<base target="_top" />
I also used this in my main frameset page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
I sure you used something similar.
Ron |
|
alicelouise
Joined: 06 Feb 2007 Posts: 8
|
Posted: Fri Mar 02, 2007 4:17 am |
|
|
|
Thanks for the reply Ron.
Sorry to be slow, but I'm very new to all of this, and I don't quite understand your answer.
| Quote: |
try putting this between your <head> tags on each page called to be loaded.:
<script type="text/javascript">
<!--
if(top==self) self.location.href="faqs.html";
//-->
</script>
<base target="_top" />
|
Do you mean that I should put this code in the 3 navigation bar pages that the menus sit in? Also, what href should I be using - is it the href of the new page?
Thanks for the help
Alice. |
|
PayneLess Designs

Joined: 28 Feb 2007 Posts: 890 Location: Biloxi, MS
|
Posted: Fri Mar 02, 2007 1:24 pm |
|
|
|
Sorry, was real late in the AM for me. Should have explained. For example, you have one page called faqs.html. You have another one which loads into a frame the logo, nav or whatever. Then another which loads into another frame page the main content (see Example).
The basic faqs.html is the frame page that calls the other two. On each of the other two between the <head> tags, put the <sript> shown. It kinda ensures your pages load into your main frame page (example in script: faqs.html).
This info is not my own, but comes from a member of a group I belong to:
Tutorial: Re-framing frames
This page will explain it far better than I could.
HTH,
Ron |
|
alicelouise
Joined: 06 Feb 2007 Posts: 8
|
Posted: Mon Mar 05, 2007 4:20 am |
|
|
|
Thanks for the explanation Ron,
I've tried your code, but all I can get it to do is to reload the home page! I've had a look at the link you gave me:
| Quote: |
This info is not my own, but comes from a member of a group I belong to:
Tutorial: Re-framing frames
This page will explain it far better than I could.
|
and if I can work out how to implement Version A, I'll try that.
At the moment I have got a workaround:
Instead of pointing the menu to the new content page I want to load, I point the menu to a new frameset which contains the name of the new content page.
It's still easy to maintain the site because the new frameset is just a copy of the homepage frameset, the only change being the name of the content page that loads into the centre window. So if I make a change to 1 of my menus it will show on all the content pages I've set up.
This workaround is a bit clumsy though, since I have to have a frameset for every content page. A neat javascript solution would be much better!
Thanks again,
Alice. |
|
PayneLess Designs

Joined: 28 Feb 2007 Posts: 890 Location: Biloxi, MS
|
Posted: Mon Mar 05, 2007 10:32 am |
|
|
|
Hi Alice:
This is what I have on the faqs.html main page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>FAQs</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> (NOTE:I need to change this type LOL)
<meta http-equiv="keywords" content="keywords blah-blah" />
<meta http-equiv="description" content="page description" />
<link href="filename.css" rel="stylesheet" type="text/css" />
</head>
<frameset cols="100%" rows="41%,*">
<frame name="header" src="faqs_fr1.html" scrolling="no" frameborder="0" noresize="noresize" />
<frame name="content" src="faqs_fr2.html" scrolling="auto" frameborder="0" noresize="noresize" />
</frameset></html>
Notice I've called out my other two frame pages here. The faqs_fr1.html page loads the banner and nav tabs, faqs_fr2.html loads the content below nav tabs. I'm sure you can modify this to meet your needs. Each one of those has the code given earlier on it. I used this at this site:
Example
Most of this site uses frames and index page even has iframes.
The href= in
script type="text/javascript">
<!--
if(top==self) self.location.href="faqs.html";
//-->
</script>
refers to your original frame page that has the frame tags.
Let me know if this gets you headed in the right direction. Maybe a URL to your site. I may even be on the wrong track, too.
Ron |
|
PayneLess Designs

Joined: 28 Feb 2007 Posts: 890 Location: Biloxi, MS
|
Posted: Tue Jul 24, 2007 2:41 pm |
|
|
|
Update on Example link. The site is temporarily off site until Fall.
Ron |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|