php header to target the parent frame?

Discussion in 'Web Design and Development' started by seventeen, May 13, 2009.

  1. seventeen macrumors member

    Joined:
    Apr 9, 2009
    Location:
    Denton, Tx
    #1
    hey guys, i'm using shadowbox with on a project right now to emulate facebook's pop-up "compose message" form. after the form is sent, i want to redirect to the original page outside of the iframe the shadowbox creates.

    is there a way to target the parent frame from the php header function?
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    The problem is that frames are client-side while PHP is getting processed server-side so it's unable to target another frame. It's simply outside its scope.

    Though, since it sounds like this is being done via JavaScript, you can use JavaScript to control the targeted redirect. Here's some simple documentation to get you started on that form of solution.
     
  3. seventeen thread starter macrumors member

    Joined:
    Apr 9, 2009
    Location:
    Denton, Tx
    #3
    yeah, i dont know why... but i was thinking that i needed a way to redirect even with javascript disabled. but the iframe wont exist unless javascript is enabled. so i just went with a javascript redirect and a php header from the noscript page. Recently I find myself pulling my hair out about something small and asking you guys here about it. then as soon as I post I come across the answer before you guys can respond.

    Thanks anyways for all the help you've offered me.
     

Share This Page