I would do this by invoking the window.focus method of the dialog window whenever the parent window gets focus.
This has worked fine with IE6 and with IE7 ; but with IE 8 - it works well on some workstations; however on other workstations all that happens is that the taskbar button for the dialog window flashes when window.focus() is invoked.. (the dialog window is not brought up to the front)
I open the dialog window like this:
dialogWin =window.open('aform.aspx','aaa', attr);
I handle the onfocus event of the opener window like this:
if (dialogWin != null && !dialogWin.closed)
This has worked well with past versions of IE; however it does not work with IE 8 on some workstations (the button on the taskbar merely flashes)
Is there any other approach I can take? I realize I can use showModalDialog; but this would involve rewriting a lot of code.