»
EnglishFrenchVietnamese

Print - Flying Border Popup - JavaScriptBank.com

Full version: jsB@nk » » Flying Border Popup
URL: https://www.javascriptbank.com/flying-border-popup.html

Flying Border Popup © JavaScriptBank.comThis JavaScript creates a pop-up-window that rushes right around the screen. Great impact for banners and important messages! Crossbrowser. True copy-and-paste setup.

Full version: jsB@nk » » Flying Border Popup
URL: https://www.javascriptbank.com/flying-border-popup.html



JavaScript
<SCRIPT>// Flying Border Popup// Author: Peter Gehrig // Web Site: http://www.24fun.com var popwindowvar tisurlvar tiswidthvar tisheightvar thismargin=10var tistopposition=thismarginvar tisleftposition=thismarginvar pause=20var step=20var screenwidthvar screenheightvar endposition_xvar endposition_yvar timerfunction openpopup(thisurl,thiswidth,thisheight) {tisurl=thisurltiswidth=thiswidthtisheight=thisheightpopwindow=window.open(tisurl, "newwindow", "toolbar=no,width="+tiswidth+",height="+tisheight+",top="+tistopposition+",left="+(tisleftposition)+"");screenwidth=window.screen.widthscreenheight=window.screen.heightendposition_x=screenwidth-thiswidth-thismarginendposition_y=screenheight-thisheight-thismarginmovedown()}function movedown() {if (tistopposition<=endposition_y-50) {popwindow.moveTo(tisleftposition,tistopposition)tistopposition+=steptimer= setTimeout("movedown()",pause)}else {clearTimeout(timer)tistopposition=endposition_y-50popwindow.moveTo(tisleftposition,tistopposition)moveright()}}function moveright() {if (tisleftposition<=endposition_x) {popwindow.moveTo(tisleftposition,tistopposition)tisleftposition+=steptimer= setTimeout("moveright()",pause)}else {clearTimeout(timer)tisleftposition=endposition_xpopwindow.moveTo(tisleftposition,tistopposition)moveup()}}function moveup() {if (tistopposition>=thismargin) {popwindow.moveTo(tisleftposition,tistopposition)tistopposition-=steptimer= setTimeout("moveup()",pause)}else {clearTimeout(timer)tistopposition=thismarginpopwindow.moveTo(tisleftposition,tistopposition)moveleft()}}function moveleft() {if (tisleftposition>=thismargin) {popwindow.moveTo(tisleftposition,tistopposition)tisleftposition-=steptimer= setTimeout("moveleft()",pause)}else {clearTimeout(timer)tisleftposition=thismarginpopwindow.moveTo(tisleftposition,tistopposition)}}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<body onLoad="openpopup('jsbankpopup.htm','300','180')"></body><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->