Menu
I want to display content of the iframe node <mydata>. But it not works, it just display empty message. I work on IE8.
My code:
[CODE]
<html>
<head>
<script type=”text/javascript”>
function show() {
var v = window.frames[‘IF’].document.body.innerHTML; //gives empty message
//var v = window.frames[‘IF’].document.getElementById(‘MY’).firstChild.nodeValue; //gives error
alert(v);
}
</script>
</head>
<body>
<form>
<input type=”button” value=”but” onclick=”show()” />
</form>
<iframe name=”IF” id=”IF”>
<html>
<body>
<mydata id=”MY”>ala </mydata>
</body>
</html>
</iframe>
</body>
</html>