0

I m trying to access to a table inside of a iframe using Jquery but I can´t. I need id value of (tr) inside of table but this is on a iframe and does not work. I need to click above the tr and get the value of id.

Inside Iframe:

<table id="table_3">
 <tr id="value_1">
   <td>ABC</td><td>ACB</td>
 </tr>
 <tr id="value_2">
  <td>FGH</td><td>DFG</td>
 </tr>
</table>

I'm using this to access:

<script>
 $(document).on('click', "#table_3 tr", function () {      
     alert($(this).attr('id'));          
 });
</script>

This works if i have the code inside of the main page but using iframe does not work.

0 Answers0