1 Replies - 1068 Views - Last Post: 25 December 2012 - 04:55 AM

#1 mil1234   User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 110
  • Joined: 01-February 09

get table tr data onlick

Posted 24 December 2012 - 11:03 PM

Hi Guys,

i have a problem where i need to pass the values of a table tr click to a function in javascript. My issue lies in the fact that i can't pass the id of the <TR>, as this is being created by a repeater control (asp)automatically and thus when this id created is larger then what is really being displayed on the html page i will have problems. What i'm looking after is something like the higlighted below?? or else a way how the repeater i'm using generates incremental id's and not at random!!!(but that's a question for the asp forum i guess) !!!

<tr id="li<%# ((RepeaterItem)Container).ItemIndex + 1%>" onclick="test(getName,getSurname,getAddress,getDOB,etc)">
<td><%# Eval("name") %></td>
<td><%# Eval("surname") %></td>
<td><%# Eval("address")%></td>
<td><%# Eval("dob") %></td>
<td><%# Eval("guard1") %></td>
<td><%# Eval("classe") %></td>

Thanks guys ......

Is This A Good Question/Topic? 0
  • +

Replies To: get table tr data onlick

#2 JackOfAllTrades   User is offline

  • Saucy!
  • member icon

Reputation: 6246
  • View blog
  • Posts: 24,014
  • Joined: 23-August 08

Re: get table tr data onlick

Posted 25 December 2012 - 04:55 AM

Was This Post Helpful? 2
  • +
  • -

Page 1 of 1