Forum Moderators: open
Ive looked at the code : passpage = document.URL
if (top.location == self.location)
top.location.href="master.html?" + passpage
Then create just one "master.html" page. It holds the JavaScript code to decipher whatever URL is passed after the "?" and it writes that page into the content frame:
<html>
<head>
<title>Master Frameset</title>
</head>
<script language="JavaScript" type="text/javascript">
origURL = parent.document.URL
contentURL = origURL.substring(origURL.indexOf('?')+1, origURL.length)
document.write('<frameset cols="20%,80%"><frame src="leftnav.html" name="nav"><frame src="' + contentURL + '" name="content"><\/frameset>')
</script>
</html>
but after struggling with it for ages i need some help - im not clear what needs customising...
i have a HomePage with three frames, two Nav frame one each side of the screen, and a central content frame - where the Homepage go when the site is opened, but also where all the other page go when selected...or pages opened via SE's...
what code needs to go onto the frameset? and what needs customising...
I would be very grateful for help...
Thanks so much
Harley
document.write('<frameset cols="20%,60%,20%"><frame src="leftnav.html" name="navl"><frame src="' + contentURL + '" name="content"><frame src="rightnav.html" name="navr"><\/ frameset>')
Now, if one of the nav frames has several different nav pages that might be loaded, you would need to create a separate javascript for each of those options -- and then run the correct one for the potentially orphaned content page.
Then these three lines of javascript should be added to, or called from, the <head> section of any potentially orphaned page:
passpage = document.URL
if (top.location == self.location)
top.location.href="master.html?" + passpage
OK - so i create a new html file called master.html containing only the html between the <html> tags...thats easy...
but its the rest i cant seem to get right...
i know its alot to ask - and im sure you have better things to be doing - but can you explain with an applied example? assume my frameset is "homepage.html" which three frames a (20%) b (60%) and c (20%) - there are two more files, "mainpage.html" which is the homepages content page found in frame b and "otherpage.html" which is the page that would normally get orphaned...
I would be eternaly grateful if you could show me the light - i have struggled and struggled with it and its driving me nuts - cos the code isnt all that hard at all - i cant see how im failing - but i am... :(
THANK YOU SO MUCH!
Harley
Please help me clarify this - as I see it, for a three panel frame page you need 5 HTML documents:
1. Regular Frameset
2. Left Frame
3. Center Frame
4. Right Frame
5. Master Frameset, scripted for orphans
Are we on the same "page" so far?