force popup window focus
Hi,
I have a form within a web application that allows users to delete records from a select list control. When the user clicks the delete button in the form, the application displays a jsp popup window. I have done everything i can think to do to lock the application down so that the user has to address the popup dialog before they can take any other action in the application.
On clicking the delete button in the main window's form, the select list control is disabled. The jsp popup window declares an event in its body tag:
onblur="self.focus()"
Doing these two things has assured that, so long as the user doesn't navigate away from the browser, they will have to address the popup
dialog by clicking a 'yes' or 'no' button, or they will have to dismiss it by clicking the 'X' close button at the upper right hand corner of the popup window.
The problem is, when the user leaves the browser by selecting any other application, and then returns to the main window they are able to click on elements on the page at that point - doing so generates servlet errors in the application.
I would like to either force the popup window to the foreground when the user returns to the web application. I want to avoid using
javascript confirm() dialogs, as the application standard for this webapp is to use jsp popups.
I have looked through a bunch of documentation on javascript events and DOM objects, and i cannot see a way i can do that.
Does anyone have any ideas?
Any help is greatly appreciated.
Thanks,
Jake
|