views:

74

answers:

2

hello

i need a popup window to appear to the user but without parent widow !

but this is impossible

so i think that I may have to make the popup close the parent after it appears, but how ?

i tried this in the popup:

<BODY align="center" valign="center" onload="javascript:window.opener='x';window.close();">

but it closed the popup window itself !

any idea to make the popup close its parent ?

A: 

try window.opener.close() instead.

klausbyskov
thank you all "klausbyskov" , it works when i try your answer but i dont want the warning, how can i work without it?
nelly
@lusey - You can't, no offense but it's there to protect the user against things just like you're doing.
Nick Craver
what I am trying to do is nothing but closing the window that I opened :/
nelly
A: 

Unless the "parent window" was opened with JavaScript itself, then that is not possible. JavaScript is only allowed to close windows it opened itself.

RoToRa