Addressing Table Cell Contents in DOM using .all[nn] or ???

Discussion in 'ASP .Net' started by =?Utf-8?B?RWFybCBUZWlncm9i?=, Oct 21, 2004.

  1. (OK, this is not really asp.net, but who else is going to help me?)
    I just started doing relative DOM addressing to address contents of my JS
    objects. Most of it is very simple but I was wondering of the .all[]
    syntax is the most compatible and best was of addressing the objects
    withing a table cell?

    For example, I have a table with

    <TR onmouseover="TabOver(this)">
    <TD>
    <img src="spacer5.gif">
    </TD>
    </TR>

    And the function looks like

    function TabOver(TabRow)
    {
    TabRow.cells[0].all[0].src='/images/foo.gif'
    }

    Thanks

    Earl
    =?Utf-8?B?RWFybCBUZWlncm9i?=, Oct 21, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?RWFybCBUZWlncm9i?=

    bruce barker Guest

    the .all. operator is IE only, not w3c compliant. i assume if ms ever does a
    new browser, it will be w3c complaint and not support .all. operator. use
    the dom object methods.

    -- bruce (sqlwork.com)


    "Earl Teigrob" <> wrote in message
    news:...
    > (OK, this is not really asp.net, but who else is going to help me?)
    > I just started doing relative DOM addressing to address contents of my JS
    > objects. Most of it is very simple but I was wondering of the .all[]
    > syntax is the most compatible and best was of addressing the objects
    > withing a table cell?
    >
    > For example, I have a table with
    >
    > <TR onmouseover="TabOver(this)">
    > <TD>
    > <img src="spacer5.gif">
    > </TD>
    > </TR>
    >
    > And the function looks like
    >
    > function TabOver(TabRow)
    > {
    > TabRow.cells[0].all[0].src='/images/foo.gif'
    > }
    >
    > Thanks
    >
    > Earl
    bruce barker, Oct 21, 2004
    #2
    1. Advertising

  3. Bruce,

    My question is, "What should I use in place of the .all[] syntax"? What does
    the same thing and is w3c complient"

    Thank

    "bruce barker" wrote:

    > the .all. operator is IE only, not w3c compliant. i assume if ms ever does a
    > new browser, it will be w3c complaint and not support .all. operator. use
    > the dom object methods.
    >
    > -- bruce (sqlwork.com)
    >
    >
    > "Earl Teigrob" <> wrote in message
    > news:...
    > > (OK, this is not really asp.net, but who else is going to help me?)
    > > I just started doing relative DOM addressing to address contents of my JS
    > > objects. Most of it is very simple but I was wondering of the .all[]
    > > syntax is the most compatible and best was of addressing the objects
    > > withing a table cell?
    > >
    > > For example, I have a table with
    > >
    > > <TR onmouseover="TabOver(this)">
    > > <TD>
    > > <img src="spacer5.gif">
    > > </TD>
    > > </TR>
    > >
    > > And the function looks like
    > >
    > > function TabOver(TabRow)
    > > {
    > > TabRow.cells[0].all[0].src='/images/foo.gif'
    > > }
    > >
    > > Thanks
    > >
    > > Earl

    >
    >
    >
    =?Utf-8?B?RWFybCBUZWlncm9i?=, Oct 22, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. PJ6
    Replies:
    1
    Views:
    383
    darrel
    Aug 17, 2005
  2. Aaron
    Replies:
    0
    Views:
    387
    Aaron
    Dec 29, 2005
  3. Earl T
    Replies:
    0
    Views:
    99
    Earl T
    Oct 20, 2004
  4. Andrew Poulos
    Replies:
    7
    Views:
    170
    Richard Cornford
    Jan 18, 2005
  5. Replies:
    0
    Views:
    189
Loading...

Share This Page