Click to See Complete Forum and Search --> : Forcing frames


stampman
07-20-2003, 08:04 AM
I have a website which is built on traditional HTML frames.

When searching a search word which I use in meta tags, in a search engine, some of my pages comes up alright, but the pages only - without the frame construction (!)

I wonder if someone out there know of any Java Script or so, which I can place in these pages, which in turn will FORCE any browser FIRST to load up the frame construction BEFORE loading up the page itself, in order to be shown correctly ?

I am not very 'advanced' in this, but I find it fascinating, though.

Many thanks in advance for any help!

Charles
07-20-2003, 08:16 AM
It cannot be done, not for more than 87% of users that's why it's important to make sure that each page can stand on its own and why so many web authors have abandoned frames. Once you page can stand on its own, use something like

<script type="text/javascript">
<!--
if (self.location == top.location) {self.location.replace('frameset.html')}
// -->
</script>

stampman
07-20-2003, 08:26 AM
Where in the document shaould this be placed? Between Head and Body or inside Body?
Does this script refer to all the pages that load up incorrectly which comes up when clicking a link from a search engine?

Or should this script be placed also in the pages that make up the frame construction?

Lotus
07-20-2003, 08:30 AM
Scripts should be placed inside the <head> tags, but don't have to, u can place them inside the <body> tags as well.

pyro
07-20-2003, 09:16 AM
Please do not cross post... This is the third thread I've come across...

http://forums.webdeveloper.com/showthread.php?s=&threadid=13416

stampman
07-20-2003, 10:12 AM
Sorry, I thought the different forums consisted of different people. People with different specialities. Thats why. Again sorry.