identifying values in TABLE cells


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: identifying values in TABLE cells

  1. #1
    russ Guest

    identifying values in TABLE cells


    Have a table with the first column being option buttons. A user clicks on
    one to identify the row of data they want. What I want to do is once they
    pick a row to then identify the value in the third cell on the row they chose.
    I know this can be done using a loop.
    (The table is dynamically built using ASP so when the option button TD is
    built, an onClick event is added to the code.)

    Can you identify the specific row and gets a cells value without going thru
    a loop and checking each row until you find the checked one? Sometimes the
    table could have a large number of rows and there's too much delay waiting
    for it loop.

    Could the onClick event be used?

    Thanks for any help.


  2. #2
    Steve Cochran Guest

    Re: identifying values in TABLE cells

    for the onclick, window.event.srcelement should give you the TD, then you
    can reference the TR via window.event.srcelement.parent and then the other
    TD's in the row via window.event.srcelement.parent.children.

    I think that should work.

    steve

    "russ" <rusjenandall@netzero.net> wrote in message
    news:392aaf5d$1@news.devx.com...
    >
    > Have a table with the first column being option buttons. A user clicks on
    > one to identify the row of data they want. What I want to do is once they
    > pick a row to then identify the value in the third cell on the row they

    chose.
    > I know this can be done using a loop.
    > (The table is dynamically built using ASP so when the option button TD is
    > built, an onClick event is added to the code.)
    >
    > Can you identify the specific row and gets a cells value without going

    thru
    > a loop and checking each row until you find the checked one? Sometimes the
    > table could have a large number of rows and there's too much delay waiting
    > for it loop.
    >
    > Could the onClick event be used?
    >
    > Thanks for any help.
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center