Hi first of all I don't know JavaScript. So I've got a popup window on my main page with Christmas wishes for the clients. I want the popup windows to close after say 20 seconds. I got the following code from the internet, the popup window opens fine but I need help with the following:
Where do I put in the time limit for the popup window and
Where do I tell the page to run the function to close the popup window, I've got the funcion winClose but must I also put that in the tag?:
The code
<script type="text/javascript">
function poponload()
{
testwindow = window.open("cm.html", "myWindow", "location=1,status=1,scrollbars=1,width=600,height=500");
}
function winClose() {
myWindow.close()
}
</script>
</head>
<body onload="javascript: poponload()" bgcolor="#FFFFFF" text="#000000" topmargin="0">
There is a
setInterval
function inJavascript
, Usage :