Problem with menu in frames...

liunx

Guest
Hi there, <br />
I'm developing a menu for a site, but I can't get it to work properly in frames! I want the menu to appear in the bottom frame, and the menu is on every page, but it will only appear when the user refreshes the browser.....<br />
here is the frameset - <!-- m --><a class="postlink" href="http://www.bluecustard.co.uk/menu/index.htm">http://www.bluecustard.co.uk/menu/index.htm</a><!-- m --> and here are the files without the frameset - <!-- m --><a class="postlink" href="http://www.bluecustard.co.uk/menu/homepage.htm">http://www.bluecustard.co.uk/menu/homepage.htm</a><!-- m --> - the menu works fine and appears every time when there is no frameset.<br />
The HTML refers to 2 javascript files which hold all the info for the menu:<br />
<!-- m --><a class="postlink" href="http://www.bluecustard.co.uk/menu/menu_com.js">http://www.bluecustard.co.uk/menu/menu_com.js</a><!-- m --> - main script<br />
<!-- m --><a class="postlink" href="http://www.bluecustard.co.uk/menu/nwrmenu_var">http://www.bluecustard.co.uk/menu/nwrmenu_var</a><!-- m --> - variable script.<br />
I think if I can 'force' the menu scripts to re-load it would solve the problem.<br />
If anyone can help me with this I'd be most grateful<br />
Cheers<br />
<br />
Rob.<!--content-->worx just fine in my ie6... what browser are you having this problem in?<!--content-->I'm also using IE6, but I've checked it on several PCs and they all behave in the same way! when viewed in frames <!-- m --><a class="postlink" href="http://www.bluecustard.co.uk/menu/index.htm">http://www.bluecustard.co.uk/menu/index.htm</a><!-- m --> the menu only appears in the lower frame when you first load it in.... if you then click on a menu button or sub-button, it will goto the next page but the menu fails to load until you refresh the entire frame.<br />
I can't understand why you can see the menu and I cannot.<br />
<br />
It is obviously really important to get the menu to successfully appear on every page for all browser like in the 'unframed' version.<br />
<br />
I'll look further into it!<br />
<br />
Cheers<!--content-->I'm seeing the problem in IE6. <br />
Not sure if it has anything to do with it, but the javascript on "page2" are within "<p>" tags. <br />
Probably not you problem, though, as the same thing happens when you go home (you have to refresh to get the menu back.)<!--content-->Originally posted by RobbieC <br />
I'm also using IE6, but I've checked it on several PCs and they all behave in the same way! when viewed in frames <!-- m --><a class="postlink" href="http://www.bluecustard.co.uk/menu/index.htm">http://www.bluecustard.co.uk/menu/index.htm</a><!-- m --> the menu only appears in the lower frame when you first load it in.... if you then click on a menu button or sub-button, it will goto the next page but the menu fails to load until you refresh the entire frame.<br />
I can't understand why you can see the menu and I cannot.<br />
<br />
It is obviously really important to get the menu to successfully appear on every page for all browser like in the 'unframed' version.<br />
<br />
I'll look further into it!<br />
<br />
Cheers <br />
<br />
well... now i see what you are talking about:<br />
basically, when you first load the url, the menu comes up just fine. the disappearing act occurs when you 'then' click on those menu options to load the next page. HOWever, if you load the pages lke page2.htm in the addressbar then the pages act correctly and don't disappear... thus the problem is no doubtly in the javascript code of the menu...<br />
<br />
hold on, im going to try to research this a little for you and will reply soon on it...<br />
<br />
btw, the javascript in the <p> tags is ok, being inside of <p> tags isn't affecting the menu as you can see when you dont use the frameset and just load like page2.htm and click on the links in the menu...<!--content-->got it!!<br />
<br />
in the file: menu_com.js:<br />
find the code:<br />
<br />
var Par=parent.frames[0]&&FirstLineFrame!=SecLineFrame?parent:window;<br />
var Doc=Par.document;<br />
<br />
this is the problem, it messes with accessing frames and it's info ( a bit overkill for your purposes )<br />
<br />
change it to:<br />
<br />
//var Par=parent.frames[0]&&FirstLineFrame!=SecLineFrame?parent:window;<br />
//var Doc=Par.document;<br />
<br />
var Doc=document;<br />
<br />
<br />
<br />
NOTE: Make sure to ADD that last line [ var Doc=document; ] and all should be well...<br />
<br />
let us know if this solution causes additional probs, k? :D<!--content-->Hey, nice one mate! Works a treat! Thank God for that! I can now move onto the next bit.<br />
<br />
Cheers!<br />
<br />
Rob<!--content-->
 
Back
Top