window.close()

  • Thread starter Thread starter Allen
  • Start date Start date
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
 
<script>
function closeMe() {
window.opener = self;
window.close();
}
</script>
 
window.opener = self;
window.close();

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
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
|
|
 
Back
Top