|
|
Banner |
| Tutorial |
| Sample HTML Document | This is the Script | Instruction |
| <html> <head> <title> </title> <script> // CREDITS <!-- Beginning of JavaScript - var popwindow var popwindowwidth=200 var popwindowheight=150 var popwindowtop=20 var popwindowURL="mypopup.htm" var waitingtime=4 var pause=20 var step=40 var popwindowleft=-popwindowwidth-50 var marginright var pagecenter var timer waitingtime= waitingtime*1000 function 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+=step timer= setTimeout("movewindow()",pause) } else { clearTimeout(timer) timer= setTimeout("movewindow2()", waitingtime) } } function movewindow2() { if (popwindowleft<=marginright) { popwindow.moveTo(popwindowleft, popwindowtop) popwindowleft+=step timer= setTimeout("movewindow2()",pause) } else { clearTimeout(timer) popwindow.close() } } // --> </script> </head> <body onLoad="showWindow()">
|
This is the first part of the Script. Put the mouse cursor over the box, Sellect all, copy and past it in your HTML document. This is the second part of the Script. Put the mouse cursor over the box, Sellect all, copy and past it in your HTML document. |
Put the mouse
cursor over the box of the first part of the script;
Sellect all, copy and past it in your HTML document between the <head>and</head> tags. ----------------- Put the mouse cursor over the box of the second part
of the Script;
Sellect all, copy and past it in your HTML document Inside the <body here > tag ------------------ You can change the values on red of the variables.
|
| DISCLAIMER | For more scripts visit: www.24fun.ch |