Bust out of iframe

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

    #1

    Bust out of iframe

    If a link is targeted to an iframe, can the linked page do anything to NOT
    appear in the iframe? My efforts to make the linked page pop up a window or
    an alert outside of the iframe aren't working.

    TIA


  • Evertjan.

    #2
    Re: Bust out of iframe

    boyscout wrote on 21 okt 2003 in comp.lang.javas cript:
    [color=blue]
    > If a link is targeted to an iframe, can the linked page do anything to
    > NOT appear in the iframe? My efforts to make the linked page pop up a
    > window or an alert outside of the iframe aren't working.[/color]

    <a href=".." target="_top">. .</a>

    or

    <script>
    top.location.hr ef="..."


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

    Comment

    • kaeli

      #3
      Re: Bust out of iframe

      In article <Xns941BE9490E5 7Beejj99@194.10 9.133.29>,
      exjxw.hannivoor t@interxnl.net enlightened us with...[color=blue]
      > boyscout wrote on 21 okt 2003 in comp.lang.javas cript:
      >[color=green]
      > > If a link is targeted to an iframe, can the linked page do anything to
      > > NOT appear in the iframe? My efforts to make the linked page pop up a
      > > window or an alert outside of the iframe aren't working.[/color]
      >
      > <a href=".." target="_top">. .</a>
      >
      > or
      >
      > <script>
      > top.location.hr ef="..."[/color]


      Won't that change the page location? Nor sure if the OP wants to
      overwrite the page or open a new window...

      Try using "_new" in links as the target if you want a brand new window
      or using window.open in script.


      -------------------------------------------------
      ~kaeli~
      Jesus saves, Allah protects, and Cthulhu
      thinks you'd make a nice sandwich.


      -------------------------------------------------

      Comment

      • Lasse Reichstein Nielsen

        #4
        Re: Bust out of iframe

        "boyscout" <nospam@nospam. com> writes:
        [color=blue]
        > If a link is targeted to an iframe, can the linked page do anything to NOT
        > appear in the iframe?[/color]

        No. *After* the page has appeared in the iframe (or at least a little
        of it has appeared), it can try breaking out.
        [color=blue]
        > My efforts to make the linked page pop up a window or an alert
        > outside of the iframe aren't working.[/color]

        I think something else is wrong. Alerts and popups are created by the
        browser, and are typically not constrained to the frame that opened
        them.

        How is it failing? Are you getting any Javascript errors for the code
        in the iframe? Are you sure the page is being loaded at all?

        /L
        --
        Lasse Reichstein Nielsen - lrn@hotpop.com
        Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
        'Faith without judgement merely degrades the spirit divine.'

        Comment

        • Lasse Reichstein Nielsen

          #5
          Re: Bust out of iframe

          kaeli <infinite.possi bilities@NOSPAM att.net> writes:
          [color=blue]
          > Try using "_new" in links as the target if you want a brand new window[/color]

          The string "_new" has no special meaning to browsers. There is no
          difference between using "_new", "new" or "arglebargl e", it is just
          the name of the new window. A second link with the same target will
          open in the same window.

          To get a new window for every time the link is clicked, use the target
          "_blank".

          The "special" names are "_blank", "_self", "_top", and "_parent". In
          fact, a browser that adheres strictly to the HTML specification must
          ignore any other target name starting with an underscore, so the
          target name "_new" would be equivalent to no target. Browsers rarely
          follow the HTML specification strictly.

          <URL:http://www.w3.org/TR/html4/types.html#h-6.16>
          [color=blue]
          > or using window.open in script.[/color]

          The target names for window.open (the second argument) follow the
          same rules as HTML target names.

          /L
          --
          Lasse Reichstein Nielsen - lrn@hotpop.com
          Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
          'Faith without judgement merely degrades the spirit divine.'

          Comment

          Working...