Click to See Complete Forum and Search --> : close window when clicking other
rosebudjoy
11-25-2003, 04:03 AM
Hi..
I need the window on top to autoclose when the user clicks whatever is under it or basically anywhere off the page. Any takers? Thanks
rosebudjoy@yahoo.com
Khalid Ali
11-25-2003, 06:37 AM
doesn't look like there will be a simple solution...mainly because of you clike on anywhere else,there is no way you can find that out in the browser window..
halifaxrick
11-25-2003, 08:35 AM
Is it possible to determine when a window is nolonger the focus (no longer on top)? If so, could the window be closed when this happens (which would be when anywhere but the window is clicked)?
Sorry it's just a theory and not an answer.
ray326
11-25-2003, 10:07 AM
You could try
<body onblur="window.close()">
halifaxrick
11-25-2003, 10:23 AM
Thanks Ray, that should do at least most of what you want rosebudjoy.
rosebudjoy
11-25-2003, 01:24 PM
Thanks for the help. What exactly is the 'onBlur' command doing?
Here's the result
www.christianemillinger.com
click on the animal left/center. Then click throught the site to see which windows close etc.
halifaxrick
11-25-2003, 01:32 PM
The onBlur command (using windows terms) means that the requested action occurs when the window is no longer the "Top" (current) window. This can occur in a few different ways, clicking on another window, ALT-TABing to another window, a popup loading, a programme that hasn't finnished loading finishes loading and appear on top, you get an instant message and the mesenger appears on top, etc...