I have an iframe. I want to access a table which present inside iframe.I want to access it from parent window of iframe. I have written JS like
Document.getElementById("table Id");
But the result come null. What is the process to get it? thanks
I have an iframe. I want to access a table which present inside iframe.I want to access it from parent window of iframe. I have written JS like
Document.getElementById("table Id");
But the result come null. What is the process to get it? thanks
You have to select the element from the iFrame's document. Per Juan's comment, check against both the name, and id of the iFrame
EDIT
I just tested this with the following:
in the Chrome console, and it output the html of the
Adam
div from within my iframe.if you can use jQuery i guess it will work across browsers
$("#iFrameId").contents().find("#tableId")