Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Oct 2006
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Parent Frame Redirect

    I have searched and tried a few solutions and none have worked for me so far.

    My problem is I have a index page that uses two frames. There is a menu frame and then a content frame. Depending on the menu item that is clicked, one of two things will happen.

    1. A message will be displayed in the content frame.
    2. The parent frame redirects to an external website somewhere.

    I can get the redirect working in the content frame, but I would like it to load the page in the parent index page instead of a frame.

    Is there any way of doing this?

  • #2
    Senior Coder ckeyrouz's Avatar
    Join Date
    Jun 2009
    Location
    Montreal, Canada
    Posts
    1,044
    Thanks
    5
    Thanked 179 Times in 179 Posts
    Code:
    window.top.document.location.href = "your url here"

  • #3
    New Coder
    Join Date
    Oct 2006
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That worked. Thanks.

  • #4
    New to the CF scene
    Join Date
    Sep 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is there a way to do this in PHP? Doing this in JavaScript can be disabled simply by turning off JavaScript in the browser. I'd like to use the parent frame check in case there is an attempt to spoof the referrer URL using frames (instead of doing CAPTCHA).

    Thanks for any help!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •