Forum Moderators: open
As I have set up some javascript to load the TOP and INDEX frames when someone accesses the MAIN frame as an orphan from a search engine, it has caused problems with the back button if people come via a sesarch engine. Also creating 'favourites' of individual sections is impossible 'cos it only saves the main original frameset.
I would like to have the MAIN sections as individual pages specifying the 2 other frames independently of the original 'index.html' frameset.
e.g anyone accessing a section through a search engine will in actual fact load all 3 pages. Sooo, what I really want is a way to set up a frameset without having a separate frameset file.
Any other suggestions very gratefully received! It's prob very simple - but it's driving me mad, the more I think about it the more I can't think about it!
Sooo, what I really want is a way to set up a frameset without having a separate frameset file.
The only way you can do that is with iframes.
Unfortunately, the standard top - left - main frame layout would be difficult to do with iframes, because there really isn't a value that will allow you to stretch the navigation frame to fill the page from the bottom of the top frame to the bottom of the viewport (like the "*" value for the rows attribute on a frameset). You could do something similar using iframes and fixed positioning, but that css attribute isn't supported in MSIE (alas).
Furthermore, you would lose one of the big benefits of frames -- every time a visitor would load a new page, s/he would also have to load the content of the iframes again, or at least check for new versions of them (depending on their cache settings, that is).
So I'd just stick to a frameset and place a link javascript on the page allowing a visitor to bookmark the particular page that they want. Then, when visitors return with said bookmark your standard orphaned-page script will kick in and load the frameset for them.
Hopefully someone else has a better idea. ;)
what I really want is a way to set up a frameset without having a separate frameset file.
You need one (and only one) dummy frameset for each frame that may come up orphaned - not one for each page, just one for each frame.
So, the most you should need for your site is three extra "dummy" framesets, where the content page gets written in.
There's one such scheme on message 21 of our generic javascript thread [webmasterworld.com].
... creating 'favourites' of individual sections is impossible 'cos it only saves the main original frameset.
Even with scripting - client side or server side, - your visitor cannot create a favorite in the ordinary manner. If they are very savvy, they might be able to pull out the URL for the content page and create their own bookmark, knowing that your code will redirect. You could probably write a server side script to do the same thing - and give them a link on the to request a bookmark URL.