J
John Kotuby
Hello all...
I am working on an ASP.NET 2.0 application with VS2005 and VB. I have chosen
to use popup windows in some cases because it makes the user experience
better (according to all the users I have polled who will be using this
app).
In an attempt to keep the popup from disappearing behind the calling window,
I am adding the onblur="FocusMe():" event to the Body tag of the popup. I
really want onblur to react to any click outside the popup Window, but I
have read that the only place to put that event when trying to apply it to
the window is in the Body tag. BTW... FocusMe() just does window.focus();
Well I thought this would be a simple task and work just fine... after all,
doesn't everybody who uses popups have to deal with this issue? That's why I
also expected to find copious documentation on the subject if I ran into a
problem...not so.
Apparently when I click on any form input type control (text, select, etc.)
that is clearly within the Window and within the Body tags, the
window.onblur (body.onblur) event fires, and the input control does not
function. Not what I expected.
I then tried placing an OnClick event in the Body of the parent window...
which looks for an open popup and places focus back onto it. That allows
controls inside the popup to work, but fails if I click on certain controls
(like links) in the parent window.
I have looked in Javascript forums and books for answers and have not found
them yet. So I am posting here, since my development environment is ASP.NET
2.0.
Somebody please tell me there is an easy way to fix this problem, and I have
just not found it yet.
Thanks to all for your help.
I am working on an ASP.NET 2.0 application with VS2005 and VB. I have chosen
to use popup windows in some cases because it makes the user experience
better (according to all the users I have polled who will be using this
app).
In an attempt to keep the popup from disappearing behind the calling window,
I am adding the onblur="FocusMe():" event to the Body tag of the popup. I
really want onblur to react to any click outside the popup Window, but I
have read that the only place to put that event when trying to apply it to
the window is in the Body tag. BTW... FocusMe() just does window.focus();
Well I thought this would be a simple task and work just fine... after all,
doesn't everybody who uses popups have to deal with this issue? That's why I
also expected to find copious documentation on the subject if I ran into a
problem...not so.
Apparently when I click on any form input type control (text, select, etc.)
that is clearly within the Window and within the Body tags, the
window.onblur (body.onblur) event fires, and the input control does not
function. Not what I expected.
I then tried placing an OnClick event in the Body of the parent window...
which looks for an open popup and places focus back onto it. That allows
controls inside the popup to work, but fails if I click on certain controls
(like links) in the parent window.
I have looked in Javascript forums and books for answers and have not found
them yet. So I am posting here, since my development environment is ASP.NET
2.0.
Somebody please tell me there is an easy way to fix this problem, and I have
just not found it yet.
Thanks to all for your help.