»
EnglishFrenchVietnamese

Print - Flying pop-up-window - JavaScriptBank.com

Full version: jsB@nk » Browser » Window » Flying pop-up-window
URL: https://www.javascriptbank.com/flying-pop-up-window.html

Flying pop-up-window © JavaScriptBank.comThis JavaScript creates a pop-up-window on the left side of your screen. The pop-up-window flaots to the center of the screen, waits a few seconds, and finally floats to the right and disappears. Great for banners and important messages!

Full version: jsB@nk » Browser » Window » Flying pop-up-window
URL: https://www.javascriptbank.com/flying-pop-up-window.html



JavaScript
<SCRIPT>// Flying pop-up-windowvar popwindowvar thistoolbar="no"var thislocation="no"var thisdirectories="no"var thisstatus="no"var thismenubar="no"var thisscrollbars="no"var thisresizable="no"var thisurl="jsbankpopup.htm"var thiswidth="300"var thisheight="184"var thisdirection="horibottom"var thistopposition="200"var thisleftposition="200"var thisfullscreen="no"var pause=20var stepfactor=15var stepxvar stepyvar marginpadding=30var startleft=0var endleft=0var starttop=0var endtop=0var marginleft=0var margintop=0var marginrightvar marginbottomvar timervar i_shakemax=3var i_shakenow=0function initpopup() {setmovevalues()openpopup()movewindow()}function setmovevalues() {marginright=screen.widthmarginbottom=screen.heightif (thisdirection=="horibottom") {startleft=marginleftendleft=marginright-thiswidth-marginpaddingstarttop=marginbottom-thisheight-2*marginpaddingendtop=starttopstepx=stepfactorstepy=0}}function openpopup() {popwindow=window.open(thisurl, "newwindow", "toolbar="+thistoolbar+",location="+thislocation+",directories="+thisdirectories+",status="+thisstatus+",menubar="+thismenubar+",scrollbars="+thisscrollbars+",resizable="+thisresizable+",width="+thiswidth+",height="+thisheight+",top="+starttop+",left="+startleft+",fullscreen="+thisfullscreen+"")popwindow.focus()}function movewindow() {window.onerror=shownoerrormessagepopwindow.focus()if ((starttop<=endtop) && (startleft<=endleft)){if (popwindow) {popwindow.moveTo(startleft,starttop)}startleft+=stepxstarttop+=stepytimer=setTimeout("movewindow()",pause)}else {clearTimeout(timer)if (popwindow) {popwindow.moveTo(endleft,endtop)popwindow.focus()}}}function shownoerrormessage() {return false;}window.onload=initpopup</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->