»
AnglaisFrançaisVietnamien

Imprimer - Flying pop-up window - JavaScriptBank.com

Version complète: jsB@nk » Browser » Window » Flying pop-up window
URL: https://www.javascriptbank.com/flying-pop-up-window-2.html

Flying pop-up window © JavaScriptBank.comCet JavaScript crée un pop-up-fenêtre sur le côté gauche de votre écran. Les pop-up-flaots fenêtre au centre de l'écran, attend quelques secondes et, enfin, flotteurs à droite et disparaît. Idéal pour les bannières et les messages importants! Crossbrowser.

Version complète: jsB@nk » Browser » Window » Flying pop-up window
URL: https://www.javascriptbank.com/flying-pop-up-window-2.html



JavaScript
<SCRIPT><!-- Beginning of JavaScript -// Flying pop-up-window//  **********************************************************************************//  **********************************************************************************// INSTRUCTIONS: // Configure the variables below// The name of the pop-up-window. Do not change itvar popwindow// The height of the pop-up-window (pixels)var popwindowwidth=300// The width of the pop-up-window (pixels)var popwindowheight=180// Distance to the top margin of the big windowvar popwindowtop=20// The URL of the HTML-file that contains the content of the pop-up-windowvar popwindowURL="jsbankpopup.htm"// Standstill-time (seconds)var waitingtime=6// Configure ths speed of the pop-up-windowvar pause=20var step=40// Do not change this variablevar popwindowleft=-popwindowwidth-50// Do not change this variablevar marginright// Do not change this variablevar pagecenter// Do not change this variablevar timerwaitingtime= waitingtime*1000function showWindow() {popwindow = window.open(popwindowURL, "popwindow", "toolbar=no,width="+popwindowwidth+",height="+popwindowheight+",top="+popwindowtop+",left="+(-popwindowwidth)+"");if (document.all) {marginright = screen.width+50}if (document.layers) {marginright = screen.width+50}pagecenter=Math.floor(marginright/2)-Math.floor(popwindowwidth/2)movewindow()}function movewindow() {if (popwindowleft<=pagecenter) {popwindow.moveTo(popwindowleft,popwindowtop)popwindowleft+=steptimer= setTimeout("movewindow()",pause)}else {clearTimeout(timer)timer= setTimeout("movewindow2()",waitingtime)}}function movewindow2() {if (popwindowleft<=marginright) {popwindow.moveTo(popwindowleft,popwindowtop)popwindowleft+=steptimer= setTimeout("movewindow2()",pause)}else {clearTimeout(timer)popwindow.close()}}// --></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<BODY onload=showWindow()></BODY><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->