Dear webmasters!
Hey! I need help.... Can you answer my question??? Have you got any script to close window on your webpage???
Please if you find any script, I will be happy!![]()
Dear webmasters!
Hey! I need help.... Can you answer my question??? Have you got any script to close window on your webpage???
Please if you find any script, I will be happy!![]()
Sure, this should work:
<a href="javascript:window.close();">Close Window</a>
It will prompt if it is not in a parent-owned popup window.
cr3ative
A retired member, drop me a line through my site if you'd like to find me!
cr3ative media | read the stickies
Won't work in all situations because browsers are touchy about that sort of thing and constantly coming up with new ways to stop you but, here it is:Of course this will simply close the window, how you use it is up to you. Things are much simpler if the window you are closing was opened as a named variable by javascript ex:Code:<script type="text/javascript"> window.opener="" window.close(); </script>This will open myWin and then close it after 5 seconds.Code:<script type="text/javascript"> var myWin=window.open('date.htm','dateWin') setTimeout("myWin.close()",5000) </script>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Yes! Thank you! But can I close 1 window in 2 ???![]()
I want to allow 1 window in 2!
You've lost me now - try re-explaining?
Thanks.
cr3ative
A retired member, drop me a line through my site if you'd like to find me!
cr3ative media | read the stickies
If you want to close two windows at once, you just have to do them one after the other in the code. If one of the windows you are closing is the one with the script, best to save it for last though, some browsers won't care.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Bookmarks