Help please redirecting frame pages using php

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dynamo

    Help please redirecting frame pages using php

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


  • Erwin Moller

    #2
    Re: Help please redirecting frame pages using php

    Dynamo wrote:
    [color=blue]
    > 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.[/color]

    Frames are evil. :-)
    [color=blue]
    >
    > I need a way using php 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?[/color]

    Yes, but I think you better use Javascript instead of PHP.
    Your problem is this: People click on a hyperlink that points to a certain
    html-file (or PHP file).
    Then the page is fetched and delivered into the browser.
    The browser should now check to see if the requested page is in a frame as
    it should.

    You can start your html-pages (or html generated by PHP) with certain checks
    to see if there are frames present.

    But try reposting this question to a javascript newsgroup for more
    information. (comp.lang.java script)

    Regards,
    Erwin Moller

    [color=blue]
    >
    > As ever any help greatly appreciated.
    >
    > TIA
    > Dynamo[/color]

    Comment

    • Dynamo

      #3
      Re: Help please redirecting frame pages using php

      In article <42bff605$0$503 82$e4fe514c@new s.xs4all.nl>, Erwin Moller says...[color=blue]
      >
      >Dynamo wrote:
      >[color=green]
      >> 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.[/color]
      >
      >Frames are evil. :-)
      >[color=green]
      >>
      >> I need a way using php 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?[/color]
      >[/color]
      [color=blue]
      >Yes, but I think you better use Javascript instead of PHP.
      >Your problem is this: People click on a hyperlink that points to a certain
      >html-file (or PHP file).
      >Then the page is fetched and delivered into the browser.
      >The browser should now check to see if the requested page is in a frame as
      >it should.
      >
      >You can start your html-pages (or html generated by PHP) with certain checks
      >to see if there are frames present.
      >
      >But try reposting this question to a javascript newsgroup for more
      >information. (comp.lang.java script)
      >
      >Regards,
      >Erwin Moller
      >
      >[color=green]
      >>
      >> As ever any help greatly appreciated.
      >>
      >> TIA
      >> Dynamo[/color]
      >[/color]
      OK Thanks for that. I'll try posting messgae in javascript newsgroup. And yes I
      know that frames are evil but having just achieved number 1 rankings for my site
      I am reluctant to make any major changes.
      Regards
      Dynamo

      Comment

      • Sandman

        #4
        Re: Help please redirecting frame pages using php

        In article <d9oqbv01oi3@dr n.newsguy.com>, Dynamo <Dynamo_member@ newsguy.com>
        wrote:
        [color=blue]
        > 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 php 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.[/color]

        1. Stop using frames. :)

        2. Your problem can't be solved with PHP since each frame loads an individual
        PHP script (or html document) that are unaware whether they are inside a frame
        or not.

        The only way is to use JavaScript, that is executed by the browser itself,
        which is the only application that knows the constellation of frames.

        --
        Sandman[.net]

        Comment

        Working...