So, I’ve got an iframe called “mainiframe” and I want to access an element in “subiframe”. As long as the “subiframe” has its name set to “subiframe”, all I have to do to find the element ‘test’ is: –

var el = parent.subiframe.document.getElementById("test");

 

Advertisements