Firefox/Chrome and frameset

Page: 1

Author Post

First of all, congratulations for a great script.
It's the only one I know that really works in a frameset environment, expanding the box to the largest parent frameset.

But... I can only get it to do it's "magic" in Internet Explorer.
Using Firefox or Google Chrome nothing happens when clicking on a picture.

Can you help?

Thank you for your time.

Jo?o Costa
Registered: Aug 2008
Posts: 3382
Hi Jo?o

You won't be able to get it to do what you are looking for from a frameset document. A frameset document has no body and is unable to display content itself. It is only able to load frames and have those frames display content. To cover the whole screen from a frameset document, floatbox needs to attach to the body of the top document, but as mentioned there is no body in the top document. Yes, IE will display the floatbox content the way you want. But it's a minor miracle that it does this, and it is in violation of the frameset spec which allows framesets to contain only frames, other framesets and alternate content for browsers that can't do framesets. The other browsers are technically correct in not displaying floatbox content from the top document.

You have two choices. One is to change your pages to use iframes instead of framesets. Floatbox works attached to the top document in all browsers in a nested iframe environment. The second option is to use framebox.js instead of floatbox.js and include this in the source file of your frame document. Doing this will make floatbox work but only within the confines of the frame it is defined in. Framebox.js in a frame will not overlay the whole page.

I'm reluctant to mention this because it's such a hack and I haven't tried it myself, but I suppose if you didn't want to rewrite your site as an iframe heirarchy you could set up a page that contains nothing but a single iframe that takes up the whole body. Then put your frameset page as the source of that single iframe. Now links within your frames will have a top document that has a body and is capable of displaying content. Like I say, a hack.
Thanks a lot for the explanation.

Page: 1