header("location... with target="_top"

Discussion in 'PHP' started by Sulan84, Dec 30, 2009.

  1. #1
    Hi. I have facebook(iFrame)-app. Im searching for a way to force automaticly one page to refresh the motherpage.
     
    Sulan84, Dec 30, 2009 IP
  2. kleinnico

    kleinnico Peon

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    As far as I know, this can't be done with PHP. You'll probably need to use javascript. The reason is that this is client-side, not server-side.

    <script type="text/javascript">
    top.location.href="http://google.com";
    </script>
    Code (markup):
     
    kleinnico, Dec 30, 2009 IP
  3. Sulan84

    Sulan84 Member

    Messages:
    121
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    28
    #3
    I tested first in javaScript with "parent-location". But this has not worked!..
    But yours is working fine.
    Thank you.
     
    Sulan84, Dec 30, 2009 IP