I am trying to get values from a table that lives inside an iframe using jquery but so far with no luck.
i have tried this code:
$('#childframe').contents().bind("dblclick", function() {
var code = $('#childframe').contents().find('.priceName').text();
alert(code);
return false; }):
but i am getting the text of the entire td for that column. because i am using gridview sap.net control i can’t set the ID for that td and I am forced to define the CssClass to “priceName”.
“childframe” is the ID for my iframe.
This should get you the text for the element that is double clicked:
Here’s a working example: http://jsfiddle.net/K9P9q/30/
EDIT
If you’re having a difficult time getting this to work, here’s another suggestion (this assumes that you control that page being loaded in the iframe).
jQuery inside iframe
Hander inside parent