Forum Moderators: open
Thank you
Regards
Steve
[edited by: korkus2000 at 1:35 pm (utc) on Oct. 18, 2003]
You can find the info here [webmasterworld.com]
Also i would remove the links to your webpage as it is against the TOS.
-gs
Is this the solution you were meaning? If so, i'f your not to busy, could you please help me a little with it?
It was written for a two frame site, so how would i modify it for my site?
Welcome to WebmasterWorld, elfeste.
I think we have just the thing you need. Check our Generic Javascript thread and go to Message #21, "FORCE MANY PAGES INTO frames with one simple script"
This script was written for a 2-frame frameset, but it's simple to adapt to your situation - just change the document.write line to write out your frameset configuration. Nothing else needs to be changed.
If this part is your index.html:
<FRAMESET ROWS=50,*>
<FRAME SRC="navigation.html" NAME="top">
<FRAME SRC="mainContent.html" NAME="main">
</FRAMESET>
Then you would have this part in your page/s that you want to force into the frameset but *still* containing that page info.
<SCRIPT LANGUAGE="JavaScript">
<!--
if (top == self){
window.parent.top.location.href = navigation.html;
window.parent.main.location.href = thisPageContent.html;
}
// -->
</SCRIPT>
HTH,
-gs
If i show you the html for my site could you please help me? And do i insert this into the head of each page i want this to happen?
Thanks SO much!
This is the frameset html for my site:-
<FRAMESET border=0 frameSpacing=0 rows=105,*,74 frameBorder=NO>
<FRAME name=Header src="frames/nav.htm" noResize scrolling=no target="main">
<FRAMESET border=0 frameSpacing=0 frameBorder=NO cols=19,*>
<FRAME name=Left src="frames/left.htm" noResize scrolling=no>
<FRAMESET border=0 frameSpacing=0 cols=730,*>
<FRAME name=main src="frames/home001.htm" scrolling=auto><FRAME name=Right src="frames/right.htm" noResize scrolling=no></FRAMESET></FRAMESET>
<FRAME name=Bottom src="frames/bottom.htm" noResize scrolling=no></FRAMESET>
Replace:
<FRAMESET border=0 frameSpacing=0 rows=105,*,74 frameBorder=NO>
<FRAME name=Header src="frames/nav.htm" noResize scrolling=no target="main">
<FRAMESET border=0 frameSpacing=0 frameBorder=NO cols=19,*>
<FRAME name=Left src="frames/left.htm" noResize scrolling=no>
<FRAMESET border=0 frameSpacing=0 cols=730,*>
<FRAME name=main src="frames/home001.htm" scrolling=auto><FRAME name=Right src="frames/right.htm" noResize scrolling=no></FRAMESET></FRAMESET>
<FRAME name=Bottom src="frames/bottom.htm" noResize scrolling=no></FRAMESET>
With:
<script language="JavaScript" type="text/javascript">
origURL = parent.document.URL
contentURL = origURL.substring(origURL.indexOf('?')+1, origURL.length)
document.write('<FRAMESET border=0 frameSpacing=0 rows=105,*,74 frameBorder=NO>
<FRAME name=Header src="frames/nav.htm" noResize scrolling=no target="main">
<FRAMESET border=0 frameSpacing=0 frameBorder=NO cols=19,*>
<FRAME name=Left src="frames/left.htm" noResize scrolling=no>
<FRAMESET border=0 frameSpacing=0 cols=730,*>
<FRAME name=main src="' + contentURL + '" scrolling=auto><FRAME name=Right src="frames/right.htm" noResize scrolling=no><\/FRAMESET><\/FRAMESET>
<FRAME name=Bottom src="frames/bottom.htm" noResize scrolling=no><\/FRAMESET>')
</script>
And put this part of the code into your framed page you want put back into frames:
<SCRIPT LANGUAGE="JavaScript">
passpage = document.URL
if (top.location == self.location)
top.location.href="index.html?" + passpage
</SCRIPT>
This will keep all the frames as is in the index page along with the main (content) page being now populated with the actual page that you require to be seen.
-gs
[edited by: Alternative_Future at 11:40 am (utc) on Sep. 11, 2003]
Its like 4 frames round the edges and one big one in the middle if you know what i mean? Like the edge round a comp monitor!
I think i may giv up on this idea, if your feeling really nice my index.htm page is www.joshcraigmotox.com/.
Thanks for all your help
Steve