Java Script


Affiche une fenêtre en plein écran

Stored Code

'Affiche une fenêtre en plein écran et lui donne le Focus Function MaximizeWindow(TitreFenExistante) { var wnd=window.Open('', TitreFenExistante); wnd.moveTo(0, 0); wnd.resizeTo(screen.availWidth, screen.availHeight); wnd.focus(); }

Affiche une nouvelle page HTML sans historique

Stored Code

'Supprime l'historisation et ne permet pas d'utiliser les touches Back et Next (y.c. les racourçis clavier) 'Dans une autre fenêtre existante Function OpenWindow(TitreFenExistante, NouvelleCible) { var wnd=window.Open('', TitreFenExistante,'titlebar=yes,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes'); wnd.location.replace(NouvelleCible); wnd.focus(); } 'Dans la fenêtre courante window.location.replace(NouvelleCible);

Ouverture dans fenêtre existante

Stored Code

'Envoi une page HTML dans une fenêtre existante et lui donne le Focus Function OpenWindow(TitreFenExistante, NouvelleCible) { var wnd=window.Open('', TitreFenExistante,'titlebar=yes,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes'); wnd.location.href=NouvelleCible; wnd.focus(); } 'Cherche une fenêtre et l'affiche. Si n'existe pas, la créé à partir d'une adresse HTML Function OpenWindow(TitreFenExistante, NouvelleCible) { var wnd=window.Open('', TitreFenExistante,'titlebar=yes,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes'); If (wnd.history.length==0) wnd.location.href=NouvelleCible; wnd.focus(); }