Does anybody know how to raise a window on top ? I would like to have
the target window to come on the front of the screen as part of an
onClick() handling routine.
Thanks for your help
Laurent
inf...@indosuez.lu
Use focus().
For example,
<script>
targetWindow = window.open("","","")
</script>
<a href='javascript:void()'
onclick='targetWindow.focus()'>Go to Target Window</a>
<a href='javascript:void()'
onclick='window.blur()'>Leave This Window</a>
<a href='javascript:void()'
onclick='targetWindow.close()'>Close Target Window</a>
You can also use window.opener.focus() to go back to the window that
opens it.
<a href='javascript:void()'
onclick='window.opener.focus()'>Go back to my creator</a>
--
Kriengkrai Porkaew (Nid)
mailto:kpor...@uiuc.edu
Simply put:
windowName.focus();
where windowName is the name of the window to receive the focus.
-Philip
k31...@trader.com
: Does anybody know how to raise a window on top ? I would like to have
: the target window to come on the front of the screen as part of an
: onClick() handling routine.
: Thanks for your help
: Laurent
: inf...@indosuez.lu
Try 'self.focus()' for it. That only works in Netscape however, and in the
IE version - it gives an error, saying that the function is not used for a
window or something like that.
Richard Dows - mar...@randomc.com