gabrielwert
Programmer
Hi! What I have here below is a source code of an HTML page and some Javascript pop up in it. You can see a sample of this code on my website in the link below:
However as you see, the page loads and the pop-p apears and closes... but... what I want is sort of a list of links that the javascript will open after this pop up.. for example:
The pop up opens: var popwindowURL="What I want is a code for the page to continue opening more pop-ups but.. instead of opening var popwindowURL=" I want it to open other Urls in sequence, then open and close the same way as the first. I've been looking all over the web for help.. so far no one has a solution! can you help me? solution worth stars!
The source of: self_closing_alert_window-sample.htm
<html>
<head>
<title>Self-closing Alert Window</title>
<script>
<!-- Beginning of JavaScript -
var popwindow
var popwindowwidth=210
var popwindowheight=150
var popwindowtop=20
var popwindowURL="var waitingtime=10
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()">
When this page Loads, a pop up will apear and close in 10 seconds.
</body>
</html>
However as you see, the page loads and the pop-p apears and closes... but... what I want is sort of a list of links that the javascript will open after this pop up.. for example:
The pop up opens: var popwindowURL="What I want is a code for the page to continue opening more pop-ups but.. instead of opening var popwindowURL=" I want it to open other Urls in sequence, then open and close the same way as the first. I've been looking all over the web for help.. so far no one has a solution! can you help me? solution worth stars!
The source of: self_closing_alert_window-sample.htm
<html>
<head>
<title>Self-closing Alert Window</title>
<script>
<!-- Beginning of JavaScript -
var popwindow
var popwindowwidth=210
var popwindowheight=150
var popwindowtop=20
var popwindowURL="var waitingtime=10
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()">
When this page Loads, a pop up will apear and close in 10 seconds.
</body>
</html>