Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Breakin' Frames

Status
Not open for further replies.

waidc

Technical User
Mar 7, 2001
23
NZ
Hi all, I have a website based on three frames (banner, contents, and main). For most pages on the site there is a separate contents and main for them, but a few only have a main.

What i'd like to do is for the pages without a contents to take up the space in both frames (contents and main) while still retaining the top, banner, frame.

I haven't explained this very well, but the long and short of it is, i want pages to be able to break out of frames, but not in the conventional sense where they break all the frames - just two out of the three.

many thanks...
 
I must confess, I'm way to tired to think. It's 3:53AM :(

Now... if I'm right without thinking (and I doubt that), your answer is as follows. Where <framename> is the name of the frame you want to use.

I hope this is useful. Slight correction may be required. Coffee ceases to work after 2AM for some reason :-/

Code:
<script>
if (window != '<framename>') {
parent.location = location;}
</script>

Instead of going to the top frame, it will only go up one.

You could also try.

Code:
<script>
if (window != '<framename>') {
top.location.document.<framename> = location;}
</script>

As in, go to the top frame and then dive back in to the level where you want the page to appear.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top