I know how to load an html page in another html page (multiple methods, javascript, jquery, html5) and I know how to post login information on an html page and submit, but here is the problem. When I load the original html page in another html page, I cannot access the form since it is in an object tag. Here is how I load the html page:
var URL = http://sampleurl.com/testpage
document.getElementById("testDIV").innerHTML = '<object type="text/html" data="'+URL+'" width="100%" height="100%"></object>';
Now I am left with something like this:
<iframe class="container-frame" name="test" src="test" data-loaded="1">
#document
<html>
<head>...</head>
<body>
...
<form>...</form>
...
</body>
</html>
</iframe>
I am unable to access the body inside the iframe using javascript to have information posted to a form in that body.
I have tried stuff like:
document.getElementsByTagName("html")[0].childNodes...
But I cannot get to the inner form element nor the body surrounding it. Is there a way that this can be done?