I know this stuff is pretty basic, but as always, this post is more self serving than anything else. It’s a bookmark and a resource for my own benefit as well. So here it goes…
_iframe = document.getElementById('iframeId'); _doc = _iframe.contentDocument || _iframe.contentWindow.document;
The code above accesses the iframe element in your page. Then you simply drill down and select the first available “document” inside the iframes context.
Pretty simple, but very useful. Keep in mind, you’ll need to access the iframe from the same protocol so if the iframe is loading from “https” then your script must also be calling from “https”.