homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

need a script to pop orphan pages into their framesets

 6:33 pm on Nov 17, 2000 (gmt 0)

of course it needs to work in both IE and NS ;)



 7:51 pm on Nov 17, 2000 (gmt 0)

oilman, I use this basic JavaScript:

if (parent == self) location.replace("frameset.html");

This script only allows one configuration of pages in the frameset. So, I define a different frameset for each potential orphan. This allows me to create a unique NOFRAMES section for each orphaned content page. There is no conflict between NN and IE here.

If you have lots of potentially orphaned pages and you want to be able to pop each one into the very same frameset using only one script --- well, I'm wrestling with a situation like this right now, and I don't have the answer.

The challenge comes because you can't define a js variable in one window -- the orphaned page, and pass that variable to another window -- the frameset.


 10:49 pm on Dec 7, 2000 (gmt 0)

you can also add this similar bit of code into your orphan's <body> tag:

<BODY onLoad="if (top == self) top.location.href = 'http://frameurl.html';"


 1:29 am on Dec 8, 2000 (gmt 0)


Welcome to the forums. Yes, that's another way to accomplish the job.

Advantage: It's backward compatible code, all the way back to JavaScript 1.0

Disadvantage: It makes a second entry to the browser history. The Back button will cause the browser to loop, returning to the same frameset page it started on, instead of what the user expects intuitively.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved