Hi
I have a page on which I have the following:
<body onfocus="checkPopups()"...
The function is:
function checkPopups(){
if(oPopup){
oPopup.focus();
}
}
To open a popup I use the following:
oPopup=window.open('page.htm....
So if the popup is open and the user clicks on the background page then focus is returned to the popup, effectively making it modal. This works great if I click the opener page once, focus is returned to the popup. However if I click the opener window again the onfocus event for the opener page does not fire.
If I manually set focus to the popup window (by clicking its toolbar button) and click the opener document once again, the onfocus fires and the popup retains focus, but a second click does not work.
I may not have explained this well but basically the first click off the popup has the desired effect (it remains modal) but the second click off the window does not work.
Any ideas?
Thanks in advance.
Cheers
Richard
I have a page on which I have the following:
<body onfocus="checkPopups()"...
The function is:
function checkPopups(){
if(oPopup){
oPopup.focus();
}
}
To open a popup I use the following:
oPopup=window.open('page.htm....
So if the popup is open and the user clicks on the background page then focus is returned to the popup, effectively making it modal. This works great if I click the opener page once, focus is returned to the popup. However if I click the opener window again the onfocus event for the opener page does not fire.
If I manually set focus to the popup window (by clicking its toolbar button) and click the opener document once again, the onfocus fires and the popup retains focus, but a second click does not work.
I may not have explained this well but basically the first click off the popup has the desired effect (it remains modal) but the second click off the window does not work.
Any ideas?
Thanks in advance.
Cheers
Richard