Google Grupper støtter ikke lenger nye Usenet-innlegg eller -abonnementer. Historisk innhold er fortsatt synlig.

How to raise a window on top ?

Sett 1 gang
Hopp til første uleste melding

inf...@indosuez.lu

ulest,
10. okt. 1996, 03:00:0010.10.1996
til

Hi !

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

Kriengkrai Porkaew

ulest,
10. okt. 1996, 03:00:0010.10.1996
til 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

Philip Snyder

ulest,
14. okt. 1996, 03:00:0014.10.1996
til inf...@indosuez.lu

inf...@indosuez.lu wrote:
>
> Hi !
>
> 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

Simply put:

windowName.focus();

where windowName is the name of the window to receive the focus.

-Philip
k31...@trader.com

Random Access System Admin

ulest,
14. okt. 1996, 03:00:0014.10.1996
til

inf...@indosuez.lu wrote:
: Hi !

: 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


0 nye meldinger