You could write an iframe alias with something like:
var $IFRAME = function (id){ return $('iframeID').contentWindow.document.getElementById(id); }
Then say that you want to get the innerHTML of the element in this frame with id 'p1', which you could do:
var x = $IFRAME('p1').innerHTML; alert(x);
Or, to manipulate it, for example, hide it, you would do:
$IFRAME('p1').hide();
The function name $IFRAME for the function is arbitrary on my part, you can call it getElementInsideIFrameID or any other calls to you.
source share