object tag as iframe

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

    object tag as iframe

    I'm using an <object> tag to replace <iframe>, not supported in a Xhtml
    strict DTD (can't use transictional).
    I can load into the <object> another page, but I don't know from there (the
    child page) how to access the parent window in IE.
    In Firefox, using

    window.parent.d ocument.getElem entById( id )

    I can retrieve the <object> tag itself and other elements at the same level
    (parent window) but IE return always null.
    How can I do?
    Thanks in advance,
    Fabio


  • Martin Honnen

    #2
    Re: object tag as iframe



    Fabio R. wrote:
    [color=blue]
    > I'm using an <object> tag to replace <iframe>, not supported in a Xhtml
    > strict DTD (can't use transictional).
    > I can load into the <object> another page, but I don't know from there (the
    > child page) how to access the parent window in IE.
    > In Firefox, using
    >
    > window.parent.d ocument.getElem entById( id )
    >
    > I can retrieve the <object> tag itself and other elements at the same level
    > (parent window) but IE return always null.
    > How can I do?[/color]

    I think with current IE versions it is not possible to get script to
    access anything outside of the object document. If you need script
    communication then you need to use frames.

    --

    Martin Honnen

    Comment

    • Jim Ley

      #3
      Re: object tag as iframe

      On Fri, 03 Jun 2005 17:55:26 +0200, Martin Honnen <mahotrash@yaho o.de>
      wrote:
      [color=blue]
      >
      >
      >Fabio R. wrote:
      >[color=green]
      >> I'm using an <object> tag to replace <iframe>, not supported in a Xhtml
      >> strict DTD (can't use transictional).
      >> I can load into the <object> another page, but I don't know from there (the
      >> child page) how to access the parent window in IE.
      >> In Firefox, using
      >>
      >> window.parent.d ocument.getElem entById( id )
      >>
      >> I can retrieve the <object> tag itself and other elements at the same level
      >> (parent window) but IE return always null.
      >> How can I do?[/color]
      >
      >I think with current IE versions it is not possible to get script to
      >access anything outside of the object document. If you need script
      >communicatio n then you need to use frames.[/color]

      In the parent:

      window.name="ch icken";

      in the child

      myParent=window .open('','chick en');

      but that's not a great solution. The solution is of course to use
      IFRAME, and as it was an IE question, the OP shouldn't be using XHTML
      anyway, so there's little problem...

      Jim.

      Comment

      • Thomas 'PointedEars' Lahn

        #4
        Re: object tag as iframe

        Fabio R. wrote:
        [color=blue]
        > I'm using an <object> tag to replace <iframe>, not supported in a Xhtml
        > strict DTD (can't use transictional).[/color]

        HTML 4.01 Strict supports the `iframe' element.
        [color=blue]
        > I can load into the <object> another page, but I don't know from there
        > (the child page) how to access the parent window in IE.[/color]

        IE does not support XHTML.


        PointedEars

        Comment

        • Richard Cornford

          #5
          Re: object tag as iframe

          Thomas 'PointedEars' Lahn wrote:[color=blue]
          > Fabio R. wrote:
          >[color=green]
          >> I'm using an <object> tag to replace <iframe>, not
          >> supported in a Xhtml strict DTD (can't use transictional).[/color]
          >
          > HTML 4.01 Strict supports the `iframe' element.[/color]
          <snip>

          No it doesn't.

          Richard.


          Comment

          • Thomas 'PointedEars' Lahn

            #6
            Re: object tag as iframe

            Richard Cornford wrote:
            [color=blue]
            > Thomas 'PointedEars' Lahn wrote:[color=green]
            >> Fabio R. wrote:[color=darkred]
            >>> I'm using an <object> tag to replace <iframe>, not
            >>> supported in a Xhtml strict DTD (can't use transictional).[/color]
            >> HTML 4.01 Strict supports the `iframe' element.[/color]
            > <snip>
            >
            > No it doesn't.[/color]

            Interesting. There appears to be an undocumented error in the elements
            list or the DTD specification since only deprecated elements should not
            be contained in Strict:

            <http://www.w3.org/TR/html4/index/elements.html>
            <http://www.w3.org/TR/html4/appendix/changes.html#id x-deprecated>
            <http://www.w3.org/TR/html4/sgml/dtd.html>


            PointedEars

            Comment

            • Lasse Reichstein Nielsen

              #7
              Re: object tag as iframe

              Thomas 'PointedEars' Lahn <PointedEars@we b.de> writes:

              [iframe not in HTML 4.01 Strict][color=blue]
              > Interesting. There appears to be an undocumented error in the elements
              > list or the DTD specification since only deprecated elements should not
              > be contained in Strict:[/color]

              Or maybe the list and DTD is correct, and the documentation describing
              them is not. I'd say that is more likely. All things about Frames,
              including IFRAME and the TARGET attribute, are not in HTML 4.01
              Strict. It appears quite deliberate.

              But yes, the documentation is not precise on this.

              The most relevant documentation is the HTML version information
              <URL:http://www.w3.org/TR/html4/struct/global.html#h-7.2>. It does
              indeed say that the strict DTD includes "all elements and attributes
              that are not deprecated or do not appear in frameset documents" (which
              I am not sure how to parse).

              If I do understand it correctly, IFRAME is not in the frameset DTD
              (it's not inside a "<![ %HTML.Frameset; ["..."]]>" section), so
              from the previous definition, it should be in the Strict DTD.

              Since IFRAME isn't in the Strict DTD, and weren't in HTML 4 Strict
              either, and nobody has considered this an error since HTML 4 became
              a recommendation in 1998, I would put my money on the DTD being
              correct and the documentation lacking.

              /L
              --
              Lasse Reichstein Nielsen - lrn@hotpop.com
              DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
              'Faith without judgement merely degrades the spirit divine.'

              Comment

              • Martin Honnen

                #8
                Re: object tag as iframe



                Jim Ley wrote:
                [color=blue]
                > On Fri, 03 Jun 2005 17:55:26 +0200, Martin Honnen <mahotrash@yaho o.de>
                > wrote:[/color]
                [color=blue][color=green]
                >>I think with current IE versions it is not possible to get script to
                >>access anything outside of the object document. If you need script
                >>communicati on then you need to use frames.[/color]
                >
                >
                > In the parent:
                >
                > window.name="ch icken";
                >
                > in the child
                >
                > myParent=window .open('','chick en');
                >
                > but that's not a great solution.[/color]

                I tried that with IE 6 on Win XP SP 2 and it opens a new window so it
                doesn't work.

                --

                Martin Honnen

                Comment

                • Jim Ley

                  #9
                  Re: object tag as iframe

                  On Tue, 14 Jun 2005 16:06:50 +0200, Martin Honnen <mahotrash@yaho o.de>
                  wrote:[color=blue][color=green]
                  >> In the parent:
                  >>
                  >> window.name="ch icken";
                  >>
                  >> in the child
                  >>
                  >> myParent=window .open('','chick en');
                  >>
                  >> but that's not a great solution.[/color]
                  >
                  >I tried that with IE 6 on Win XP SP 2 and it opens a new window so it
                  >doesn't work.[/color]

                  Interesting.. it worked fine for me, although re-visiting it seems to
                  only work the first time, if you refresh the window containing the
                  object it fails, it's certainly not a reliable technique.

                  Jim.

                  Comment

                  Working...