The Expert Is WRONG about FRAME/Obj/Img

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

    The Expert Is WRONG about FRAME/Obj/Img


    says
    document.getEle mentById('testi frame').src
    and
    frames['testiframe'].location.href
    work for all

    The exper is WRONG. here is my test:

    //document.images['test'].src//workall
    //document.getEle mentById('test' ).src//notworking in firefox/opera
    //frames['test'].location.href//notworking in opera

    so all browers can detect document.images
    only IE can use getElementById
    only IE and Firefox can only frames.

    How is your testing case going? I am using IE6.0 Firefox 9.3 and Opera 7.45

    Any idea of any UNIVERSAL OBJECT system in HTML


  • Jim Ley

    #2
    Re: The Expert Is WRONG about FRAME/Obj/Img

    On Sat, 11 Sep 2004 05:17:37 GMT, "QA" <QA@alexa.com > wrote:
    [color=blue]
    >http://www.quirksmode.org/js/iframe.html[/color]
    [color=blue]
    >The exper is WRONG. here is my test:
    >
    > //document.images['test'].src//workall
    > //document.getEle mentById('test' ).src//notworking in firefox/opera
    > //frames['test'].location.href//notworking in opera[/color]

    This isn't a testcase, you're not showing the relevant HTML code. In
    fact I would almost certainly say you're doing

    <img name= ...

    as that would do exactualy what you describe, the problems you're
    highlighting are differences in how name and ID are treated in those
    UA's so the HTML is completely relevant.
    [color=blue]
    >Any idea of any UNIVERSAL OBJECT system in HTML[/color]

    I've no idea what a universal object, even when shouted is?

    Jim.

    Comment

    • QA

      #3
      Re: The Expert Is WRONG about FRAME/Obj/Img

      > >http://www.quirksmode.org/js/iframe.html[color=blue]
      >[color=green]
      > >The exper is WRONG. here is my test:
      > >
      > > //document.images['test'].src//workall
      > > //document.getEle mentById('test' ).src//notworking in firefox/opera
      > > //frames['test'].location.href//notworking in opera[/color]
      >
      > This isn't a testcase, you're not showing the relevant HTML code. In
      > fact I would almost certainly say you're doing
      >
      > <img name= ...
      >
      > as that would do exactualy what you describe, the problems you're
      > highlighting are differences in how name and ID are treated in those
      > UA's so the HTML is completely relevant.
      >[color=green]
      > >Any idea of any UNIVERSAL OBJECT system in HTML[/color]
      >
      > I've no idea what a universal object, even when shouted is?
      >
      > Jim.[/color]

      you are so smart. I found the error myself. So getElementById is still THE
      KING, working in all, when I use ID.
      do you have any idea why http://www.quirksmode.org/js/iframe.html said ok
      frames['test'].location.href for opera but mine is not working? even i
      changed it to ID....


      Comment

      • Andrew Thompson

        #4
        Re: The Expert Is WRONG about FRAME/Obj/Img

        On Sat, 11 Sep 2004 05:56:45 GMT, QA wrote:
        [color=blue]
        > ..do you have any idea why ..[/color]

        ...do you have any url...

        --
        Andrew Thompson
        http://www.PhySci.org/ Open-source software suite
        http://www.PhySci.org/codes/ Web & IT Help
        http://www.1point1C.org/ Science & Technology

        Comment

        • Martin Honnen

          #5
          Re: The Expert Is WRONG about FRAME/Obj/Img



          QA wrote:

          [color=blue]
          > do you have any idea why http://www.quirksmode.org/js/iframe.html said ok
          > frames['test'].location.href for opera but mine is not working? even i
          > changed it to ID....[/color]

          If you have
          <iframe name="iframeNam e" src="whatever.h tml"></iframe>
          then
          window.frames.i frameName.locat ion.href = 'whatelse.html' ;
          is giving the best cross browser results to change the document in the
          iframe.


          --

          Martin Honnen

          Comment

          • Randy Webb

            #6
            Re: The Expert Is WRONG about FRAME/Obj/Img

            QA wrote:
            [color=blue]
            > So getElementById is still THE KING, working in all, when I use ID.[/color]

            Only because your test browsers support getElementById and the HTML you
            are using.

            --
            Randy
            comp.lang.javas cript FAQ - http://jibbering.com/faq

            Comment

            Working...