Hi included a site with iframe into my site which contains XML informations and I want to get the Value of a Element from the Iframe through get ElementsByTagName but Im struggling with it.
Problem is I need to send an XML Request to the server to get the response and the response Im displaying in an Iframe now i need somehow to get the response out of the iframe.
document.getElementById("myiframeexample").onload = function () {
var submissionid = document.getElementById("myxmlframe").contentWindow.document.getElementsByName("testdata")[0].value;
document.getElementById("testline").innerHTML = submissionid;
<body id="myiframeexample">
<div class="iframebox" style="display:none;">
<iframe id="myxmlframe" src="https://test.de/Auth/"></iframe>
<div class="">
<form action="verify.php" method="post">
<div class="inputbox">
<p class="testline"></p>
</div>
<input type="submit" value="submit">
</form>
</div>
The xml file inside the iframe looks as followed:
<?xml version="1.0" encoding="UTF-8"?><data><testdata>100</testdata></data>