I need to close the popup windows in the following after 3 seconds. How do I do it.
Try
<area alt="" coords="127, 22, 20" alt="" title="click here" href="includes/popup1.htm" onclick="openWindow()" shape="circle" />
function openWindow(){
var win = window.open('includes/popup1.htm', '1366002941508', 'width=500,height=200,left=375,top=330');
setTimeout(function(){
win.close()
}, 3000);
return false;
}
<area alt="" coords="127, 22, 20" alt="" title="click here" href="includes/popup1.htm" onclick="openWindow()" shape="circle" />
function openWindow(){
var win = window.open('includes/popup1.htm', '1366002941508', 'width=500,height=200,left=375,top=330');
setTimeout(function(){
win.close()
}, 3000);
return false;
}