sridhar golyandla Posted May 15, 2010 Share Posted May 15, 2010 Here is my code... Main WIndow : (test.html) <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td><iframe src="pages/frme.html" align="top" width="447" height="600" style="vertical-align:top; border:0px;"></iframe> </tr> </table> frame.html : having a hyperlink to open a popup window. popup window: having a hyperlink. here is code in popup window... onClick="javascript: return win();">xxx</a> function win() { window.opener.location.href="test1.html"; self.close(); } when am clicking on the hyperlink of the popup, the popup is closed and loaded the test1.html page in the iframe place. But i need to open as a parent window instead of iframe. Please any body suggested me how to solve my problem. Quote Link to comment Share on other sites More sharing options...
CodeMaster Posted May 15, 2010 Share Posted May 15, 2010 So I suppose you launch the popup from the iframe? And when it is closed, you don't want to load the page into the iframe (the opener of the popup), but the top location? Why not create a javascript function in the iframe that sets the parent.top location and then call that function instead of this: window.opener.location.href="test1.html"; So something like: window.opener.setTopLocation("test1.html"); and then in the function setTopLocation you do: document.top.location.href = x; Please let me know what you think. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.