homepage Welcome to WebmasterWorld Guest from 54.227.34.0
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
keeping pages in their frames
JS solution to keep pages with frames not working
lababe

10+ Year Member



 
Msg#: 169 posted 10:17 pm on Jul 30, 2002 (gmt 0)

I'm trying to use this JS code:

<SCRIPT LANGUAGE="JavaScript">
<!--
if (top.location == self.location) {
self.location.replace("frameset.html")
}
// -->
</SCRIPT>

I'm trying to resolve the problem of when the content pages are found in a search engine without it's frameset. Would anyone have a clue why this doesn't seem to be working. Am I missing a second piece of code?Any help or advice will help. Thanks, Beth

 

rogerd

WebmasterWorld Administrator rogerd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 169 posted 10:23 pm on Jul 30, 2002 (gmt 0)

Hi, Lababe, welcome to WebmasterWorld. I do something similar:

<SCRIPT LANGUAGE="JavaScript">
<!--
if (top == self) {location.replace("frameset URL")};
//-->
</SCRIPT>

Seems to work fine...

tedster

WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 169 posted 10:43 pm on Jul 30, 2002 (gmt 0)

I found an answer that doesn't resort to loading the initial state of the frameset. Instead it loads the page the visitor originally requested, much to be desired IMO!

See post #21 on the generic javascript [webmasterworld.com] thread.

lababe

10+ Year Member



 
Msg#: 169 posted 12:04 am on Jul 31, 2002 (gmt 0)

Thanks for your help. But I just found out that this site (an intranet) is controlled by many dynamic framesets within framesets. And the solution would probably be more work than it's worth. Thanks though, Beth

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
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