Help with reloading frame page please

D

Dynamo

Hi

My site uses frames and some of the frame pages are ranked higher in search
engine rankings than the main page. When somebody clicks on the link it takes
them to the frame page and they don't see my page as it should be viewed plus it
displays a javascript error.

I need a way using javascript so that when the link is clicked on in either
yahoo or lycos that it loads the main frame html page (not the subframe html)
and that the subframe html page is loaded into the correct frame within the
mainframe html page. Is this possible and how?

As ever any help greatly appreciated.

TIA
Dynamo
 
D

David Dorward

Dynamo said:
My site uses frames and some of the frame pages are ranked higher in
search engine rankings than the main page. When somebody clicks on the
link it takes them to the frame page and they don't see my page as it
should be viewed plus it displays a javascript error.

Ah, the joy of using frames.
I need a way using javascript so that when the link is clicked on in
either yahoo or lycos that it loads the main frame html page (not the
subframe html) and that the subframe html page is loaded into the correct
frame within the mainframe html page. Is this possible and how?

Option 1: Minimise the damage caused by frames

1. Create a new <frameset> document for every combination of pages that
might be viewed at once.
2. Make sure each has suitable <noframes> content
3. Make sure all your links are target="_top" and point to a <frameset>
document.
4. Write a robots.txt that asks search engines to keep out of the directory
you keep the documents intended to be viewed in the frameset.

Then you might consider something like:

if(top.location == self.location){
top.location = "http://www.example.com/frameset_for_this_page/";
}

Option 2: Get rid of the frames and use preprocessing, server side
programing or simple includes to include the common content in each.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top