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

#1 mil1234  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 109
  • 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>
</tr>

Thanks guys ......

Is This A Good Question/Topic? 0
  • +

Replies To: get table tr data onlick

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6058
  • View blog
  • Posts: 23,496
  • Joined: 23-August 08

Re: get table tr data onlick

Posted 25 December 2012 - 04:55 AM

this
Was This Post Helpful? 2
  • +
  • -

Page 1 of 1