faqts : Computers : Programming : Languages : JavaScript : Windows

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

18 of 33 people (55%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

window.close() doesn't close my popup after i use window.opener.location.href='url'; Why?

Jan 28th, 2003 03:40
Klaus Bolwin, Jazzy M,


insert into the head:
<script type="text/javascript">
var Info = window.open("file.htm", "secondary window");
</script>
and into the body:
<input type="button" value="close the window" onClick="Info.close()">
However, after changing the content of the opener window, the object
reference to the opened window is lost, this will result in an undefined
reference when closing the window.