window.opener

How to disconnect JavaScript popup from opener

删除回忆录丶 提交于 2019-11-29 07:09:31
I'm opening a popup from my main page with code like this: <a href="http://external.domain.tld/" onclick="window.open(this.href, '_blank', 'width=512,height=512,left=200,top=100');return false"> Open popup </a> This works fine, but my problem is that the document which is loaded in the popup window has the permission to change the location of the opener window. This even works when the document in the popup is from a different domain. It has no permission to read the location but it is allowed to change the location. I don't want that. I want the popup to be completely disconnected from my

window.opener alternatives

一曲冷凌霜 提交于 2019-11-27 03:51:30
I am opening a modal popup window. Then I access a parent window textbox and other attributes using window.opener . It is working fine in firefox but not in IE8. It gives error 'window.opener is null' . How can I access parent window attributes in child window which works in both browsers. You can pass arguments to showModalDialog function. Simply pass window object as an argument. window.showModalDialog(theURL, window); Yo can access the arguments from the modal window using dialogArguments. See: http://msdn.microsoft.com/en-us/library/ms533723%28VS.85%29.aspx var openerWindow = window

window.opener alternatives

烂漫一生 提交于 2019-11-26 10:55:54
问题 I am opening a modal popup window. Then I access a parent window textbox and other attributes using window.opener . It is working fine in firefox but not in IE8. It gives error \'window.opener is null\' . How can I access parent window attributes in child window which works in both browsers. 回答1: You can pass arguments to showModalDialog function. Simply pass window object as an argument. window.showModalDialog(theURL, window); Yo can access the arguments from the modal window using