Click to See Complete Forum and Search --> : frames question??


metny6
05-09-2003, 06:37 PM
Hi and thank you in advance in helping me with my brainlock!

I'm starting a website that uses frames and was wondering if anyone could tell me how to make the interior pages of a website only load when the other frames load for navigation??

Like for instance, say someone finds a page at a search engine for you site and they click on that link, how do you make that page only load with the other frames around it, and not as a stand alone page??

How do you get a framed website to do that??

Thanx alot!

khalidali63
05-09-2003, 06:54 PM
if you mean that you do not want an individual frame to be loaded by typing the address in the addressbar,put this code in the script tags
at very top

if(self.location==top.location){
self.location="index.html";
}

presuming your frames site has an index page thats actually a aframeset page.

Charles
05-09-2003, 07:16 PM
Originally posted by khalidali63
if(self.location==top.location){
self.location="index.html";
} That has the unfortunate side effect of disabling the user's back button. Your users will prefer that you use:

if (self.location == top.location) self.location.replace('index.html')

khalidali63
05-09-2003, 08:44 PM
How in the heck you know what my users would prefer?
Be a civilised person..if you want to suggest something ,please do so,but do not be a smart *** who speaks on behalf of others.just suggest the darn suggestion...

Charles
05-10-2003, 05:34 AM
Yes, it's quite clear from the examples that you keep promoting from your own web site (spamming I believe it's called) that you believe that users would prefer a web site that doesn't work. And I suppose some do enjoy a good laugh at the web author's expense but note that I didn't say that all users would prefer the method that didn't break their browsers.