How to call and running function javascript in frame one from other frame. This is my script :
My main code:
<frameset id="tes" rows="60,*">
<frame id="frame2" src="../oneframe.php" frameborder="0" allowtransparency="true" marginwidth="0" marginright="0"></frame>
<frame id="frame1" src="../twoframe.php" frameborder="0"></frame>
</frameset>
oneframe.php :
<button type="button" onClick="runFunc()">Running</button>
twoframe.php:
<html>
<head>
<title>tes</title>
<script>
function runFunc() {
var x = document.getElementById('target');
if (x.style.display === 'none') {
x.style.display = 'block';
} else {
x.style.display = 'none';
}
}
</script>
</head>
<body>
<div id="target">This is my target</div>
</body
</html>
Anyone can help me ?
<frameset>- Deprecated This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Avoid using it and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. - developer.mozilla.org/en/docs/Web/HTML/Element/frameset<frameset>is dead