PDA

View Full Version : window.close() doesn't work


imroue
11-14-2002, 05:22 AM
This function works when I used the webpage on my webserver and use the url: http://myipaddress/test.php
but when i use the domain name: http://mydomain.com/test.php
(which my domain is being forwarded too.. it doesnt close)

Any ideas????

function closeOpen()
{
eval('window.close()');
}

glenngv
11-14-2002, 05:32 AM
you don't need to use eval(), just use:

window.close()

but if you are using frames, you need to use:

top.close()

imroue
11-14-2002, 06:18 AM
Originally posted by glenngv
you don't need to use eval(), just use:

window.close()

but if you are using frames, you need to use:

top.close()

Thanks! that worked!