window.close()

A

Allen

I am using the below code in the onload event to close the window after 5
seconds.
setTimeout('window.close()', 5000);
This code propmts before it closes the window. How to make sure without
prompting the window will be closed.
Thanks,
Allen
 
A

Antonio Ambrosio

<script>
function closeMe() {
window.opener = self;
window.close();
}
</script>
 
K

Kevin Spencer

window.opener = self;
window.close();

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
B

bruce barker

IE currently has a security hole you can use (won't work in firefox);

setTimeout('window.opener=window;window.close()', 5000);

-- bruce (sqlwork.com)



| I am using the below code in the onload event to close the window after 5
| seconds.
| setTimeout('window.close()', 5000);
| This code propmts before it closes the window. How to make sure without
| prompting the window will be closed.
| Thanks,
| Allen
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,159
Latest member
SweetCalmCBDGummies
Top