Welcome to WebmasterWorld Guest from 3.80.4.76

Forum Moderators: open

Message Too Old, No Replies

Frameset Coding

opening searched page in frameset

     
9:52 am on Sep 11, 2003 (gmt 0)

New User

10+ Year Member

joined:Sept 11, 2003
posts:11
votes: 0


I have a problem with my site <snip> where i have a left.htm,right.htm, nav.htm, bottom.htm, main.htm. The main.htm will hold the content and the majority of the content will consist of two frames. If you know what i mean.
I'm trying to find the coding that will open up a page example: <snip> in the frameset page without defaulting back to the index page?

Thank you

Regards

Steve

[edited by: korkus2000 at 1:35 pm (utc) on Oct. 18, 2003]

10:13 am on Sept 11, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 22, 2003
posts:1023
votes: 0


Hi swmasson and welcome to WebMasterWorld,

You can find the info here [webmasterworld.com]

Also i would remove the links to your webpage as it is against the TOS.

-gs

10:20 am on Sept 11, 2003 (gmt 0)

New User

10+ Year Member

joined:Sept 11, 2003
posts:11
votes: 0


Sorry about the links! And thank you for your reply!

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.

10:34 am on Sept 11, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 22, 2003
posts:1023
votes: 0


Hi,

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

10:42 am on Sept 11, 2003 (gmt 0)

New User

10+ Year Member

joined:Sept 11, 2003
posts:11
votes: 0


I'm so sorry to bother you again, but i still cant get it to work.

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>

11:29 am on Sept 11, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 22, 2003
posts:1023
votes: 0


Hi,

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]

11:39 am on Sept 11, 2003 (gmt 0)

New User

10+ Year Member

joined:Sept 11, 2003
posts:11
votes: 0


I dont think that will work as it changes all frames - I have one frame top (full width) and one on the bottom. I have a left frame (very thin) and a right frame (changes width depending on screen res). The content is displayed in the main frame.

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

11:47 am on Sept 11, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 22, 2003
posts:1023
votes: 0


Ru getting the stickys am sending you?

-gs

12:03 pm on Sept 11, 2003 (gmt 0)

New User

10+ Year Member

joined:Sept 11, 2003
posts:11
votes: 0


Hi there,

No sorry, i'm not getting any private messages? Dont know why not?

Do you think you have the answer?

Thanks again

Steve

12:26 pm on Sept 11, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 22, 2003
posts:1023
votes: 0


I have a working example set up on my machine check your email from the website in question!
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members