Results 1 to 2 of 2
Thread: How Trigger window.onblur?
May 23, 2002, 23:21 #1
How Trigger window.onblur?
I have a little popup window I'm making.
I'd like the window to just destroy itself if the user clicks on the original, calling page.
This is what I tried in the header section of the popup page but the code is not being triggered:
window.onblur = window.close();
And by the way I already tried this in the body tag:
And the body tag thing actually DID close the window if the user clicked on the original calling page. BUT the window also closed if the user clicked on a combo box on the popup (because the body lost the focus), and that was not good...
May 24, 2002, 02:17 #2
- Join Date
- Feb 2002
- Gatwick, UK
- 0 Post(s)
- 0 Thread(s)
1. You're calling onblur twice - try not calling it for the body...
2. Why not have an onfocus instead in the parent, and kill the child if it exists?
Flawless---=| If you're going to buy a pet - get a Shetland Giraffe |=---