Redirect to a link by clicking on a row which contains it

Posted by Shymep on Stack Overflow See other posts from Stack Overflow or by Shymep
Published on 2012-11-26T10:46:05Z Indexed on 2012/11/26 11:04 UTC
Read the original article Hit count: 162

Filed under:
|
|

I have a table

<tr>
  <td>xxx</td>
  <td>yyy</td>
  <td><a href="javascript:__doPostBack('smth','')">Select</a></td>
</tr>
<tr>
...similar here
</tr>

My goal is to redirect to the select page link by clicking on the row. I was trying to implement such construction

$("table tr").click(function() {
  $(this).find("a").click();
});

and also a few tricks with window.location but it didn't help.

UPDATED: I'm getting errors like
enter image description here

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about table