anup.maverick
01-12-2011, 12:16 PM
Hi,
I have 2 iframes on a web page.
In 1st iframe there is a BUTTON, On Button click new pages should open in both the iframes.
I tried using window.parent , but it doesn't work in firefox, chrome, IE 8.
Following is the code :-
Main Page
<body>
<iframe src="1.htm" name="MapFrame"></iframe>
<iframe src="1.htm" name="MapFrame1"></iframe>
</body>
</html>
1st IFrame
<html>
<head>
<title>1 Level</title>
<script type="text/javascript">
function GoToParent()
{
window.parent.document.getElementById("MapFrame"). src = "1.htm";
window.parent.document.getElementById("MapFrame1") .src = "1.htm";
}
</script>
</head>
<body>
<div id="page_effect" style="display:none;">
<Button id="b1" type="button" value="CLICK ME" onClick="GoToParent()" />
</div>
</body>
</html>
Thank You....!!
I have 2 iframes on a web page.
In 1st iframe there is a BUTTON, On Button click new pages should open in both the iframes.
I tried using window.parent , but it doesn't work in firefox, chrome, IE 8.
Following is the code :-
Main Page
<body>
<iframe src="1.htm" name="MapFrame"></iframe>
<iframe src="1.htm" name="MapFrame1"></iframe>
</body>
</html>
1st IFrame
<html>
<head>
<title>1 Level</title>
<script type="text/javascript">
function GoToParent()
{
window.parent.document.getElementById("MapFrame"). src = "1.htm";
window.parent.document.getElementById("MapFrame1") .src = "1.htm";
}
</script>
</head>
<body>
<div id="page_effect" style="display:none;">
<Button id="b1" type="button" value="CLICK ME" onClick="GoToParent()" />
</div>
</body>
</html>
Thank You....!!