Help with reloading frame page please

Discussion in 'Javascript' started by Dynamo, Jun 28, 2005.

  1. Dynamo

    Dynamo Guest

    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
     
    Dynamo, Jun 28, 2005
    #1
    1. Advertising

  2. Dynamo wrote:

    > 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.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Jun 28, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ike
    Replies:
    2
    Views:
    642
    Mike Discenza
    Feb 18, 2004
  2. Anita Meyer
    Replies:
    2
    Views:
    3,425
    Anita Meyer
    Jan 28, 2005
  3. K B
    Replies:
    0
    Views:
    467
  4. Gareth
    Replies:
    0
    Views:
    140
    Gareth
    Sep 16, 2004
  5. ROBT NISHIDA

    Problems with reloading a frame

    ROBT NISHIDA, Apr 19, 2005, in forum: Javascript
    Replies:
    1
    Views:
    84
    enrique
    Apr 20, 2005
Loading...

Share This Page