getting clicked row index

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rikimar
    New Member
    • Jun 2007
    • 1

    getting clicked row index

    I have a dynamic table, and would like to get the index of the clicked row.
    The rows are added by a function
    THK
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    #2
    Originally posted by rikimar
    I have a dynamic table, and would like to get the index of the clicked row.
    The rows are added by a function
    THK

    Welcome to TSDN.

    event.srcElemen t.parentElement

    now try to see the hierarchy structure of the table and to extract the row no by rowIndex attr.

    kind regards,
    Dmjpro.

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      Originally posted by dmjpro
      Welcome to TSDN.

      event.srcElemen t.parentElement
      event.srcElemen t is IE-specific. See this for a cross-browser version.

      Comment

      Working...