Closed Thread Icon

Preserved Topic: How to make sure frames are present? Pages that link to <a href="https://ozoneasylum.com/backlink?for=18528" title="Pages that link to Preserved Topic: How to make sure frames are present?" rel="nofollow" >Preserved Topic: How to make sure frames are present?\

 
Author Thread
Lurch
Paranoid (IV) Inmate

From: Behind the Wheel
Insane since: Jan 2002

posted posted 10-06-2002 21:52

I've got a site that uses a frameset for the forums, and if you click on a link to something in the forums from somewhere else, there are no frames... how can I make sure the top frame is there, and have the main frame be the page linked to??

--Lurch--

FAQ
Nervous Wreck (II) Inmate

From: OzoneAsylum
Insane since: Sep 2002

posted posted 10-06-2002 22:22

The OzoneAsylum FaqWiki would like to point out that you weren't the first one who asked this question and mention this page:

http://faq.ozoneasylum.com/806/ - How do I stop direct links from breaking my frame site?

Enjoy - and keep expanding me!

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 10-06-2002 22:23

i dont know it very well, but i think you can check for

if(window.document.frames==false)

then there are no frames and can make a redirect to the frame page:

location.href='linkhere';

or something like that.



[This message has been edited by GRUMBLE (edited 10-06-2002).]

Nevel
Bipolar (III) Inmate

From: Amsterdam
Insane since: Jun 2002

posted posted 10-08-2002 13:40

I've thought about that for quite a while, and finally came up with the solution. Only to discover someone else had already cracked it . Check http://www.scriptasylum.com/tutorials.html for the solution. The only point in which I think my script was "better", is that I would pass location.href as a param, so than every "child-page" can contain exactly the same script.

Have phun!

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 10-08-2002 14:29

Yah, I did the same thing once before, passsing along the location.href of where you entered the system to a "super frameset" that built the page as it should have looked had you navigated there. I remember it as being quite a pain in the ass, though?

Your pal, -doc-

Nevel
Bipolar (III) Inmate

From: Amsterdam
Insane since: Jun 2002

posted posted 10-09-2002 13:00

Well,

The tricky part is indeed loading the correct page inside of the child-frame. This forces you to dynamically build (or modify) your frameset, based on the url-parameter received by the frameset(if any). If no url is being passed, you can just load the initial page. Unlike many other cool scripts, writing that script isn't so hard. Figuring out how it can be done took me a lot of inspirational showers .

My script still runs at http://home.ie.hva.nl/stats/framed/ if anyone's interested. Still, the script on scriptasylum is far more "streetwise", so I'd recommand using that one.

« BackwardsOnwards »

Show Forum Drop Down Menu