1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

iframe redirect problem

Discussion in 'HTML & Website Design' started by warrior!, Dec 18, 2009.

  1. #1
    I have a very simple page that loads links from a database into iframes. A problem I am having is that sometimes the link that is loaded into an iframe is no longer valid and the web server redirects you to another page (sometimes a login page). However, instead of redirecting the page inside the iframe, it redirects the entire page of iframes. Is there any way to prevent this from happening and force any redirected web pages in the iframe itself?

    The code that i'm using for the iframe is:

     
    warrior!, Dec 18, 2009 IP
  2. QiSoftware

    QiSoftware Well-Known Member

    Messages:
    805
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    158
    #2
    there is probably something that looks like target="_top" in the underlying page you are trying to load into the iframe. The fact that it is happening when no page is available suggests it is the default page being loaded. I do not think you can override the _parent or _top setting within the Iframe call.

    Q...
     
    QiSoftware, Dec 18, 2009 IP
  3. warrior!

    warrior! Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you for your answer, can i at least not show the iframe when the redirect is being made so i can prevent this? Like caching the page or somthing like this.
     
    warrior!, Dec 18, 2009 IP
  4. AssistantX

    AssistantX Peon

    Messages:
    173
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yes, it is possible (but not foolproof) to prevent an IFRAMEd web page from breaking out of that IFRAME. You may view an explanation here.
     
    AssistantX, Dec 18, 2009 IP
  5. amitash

    amitash Well-Known Member

    Messages:
    399
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    125
    #5
    Are you using Pligg CMS? I too have this problem. There is a widget alternative for this.
     
    amitash, Dec 18, 2009 IP
  6. warrior!

    warrior! Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I'm using joomla, but the problem appears even in a simple html template without cms.

    I tried also to put 2 iframe's one inside another but i get the same result.

    I'll check back after i'll read the explanation above.

    thanks.
     
    warrior!, Dec 18, 2009 IP
  7. warrior!

    warrior! Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    after i done some research i found out that i need an anti frame busted/breaker script.
     
    warrior!, Dec 19, 2009 IP
  8. bigvito19

    bigvito19 Member

    Messages:
    67
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #8

    Does anyone has that?
     
    bigvito19, Feb 28, 2012 IP
  9. cybertr0ne

    cybertr0ne Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    yes they probably use some frame brake code just to prevent that.
    You can try some frame brake brake tricks
     
    cybertr0ne, Feb 28, 2012 IP