I have the following code:
<div id="hello">
<iframe stc="foo/bar.html"></iframe>
</div>
Contents of iframe:
<!DOCTYPE html>
<html>
<body>
<div id="foo"></div>
</body>
</html>
How can I get the div with id "hello"?
If all this was on the same page I would do something like:
document.getElementById('foo').parentNode;
Note: I can't use jQuery for this project. Also I can't select by id because I don't know what the id of that parent would be. If it would have always been foo then I could have done:
parent.document.getElementById('foo')