Calling A Specific Id Inside A Frame
I have a iframe tag in mainpage.html, that iframe calls back.html.. is there any way to call only the specific ids in back.html for display in iframe.. Detail: I have 25x25 table i
Solution 1:
Try this code:
var iframe = document.getElementById('your-iframe-ID'),
/* or other kind of reference to the iframe DOM node */
iframeDoc = ((!!iframe['contentDocument'])
? iframe.contentDocument
: iframe.contentWindow.document),
cell = iframeDoc.getElementById('your-cell-ID');
/* this is a reference to cell inside the iframe */
Of course I assume that mainpage.html
and back.html
are in the same domain (for the same-origin policy)
Post a Comment for "Calling A Specific Id Inside A Frame"