Click here to Skip to main content
15,893,381 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hi i am creating a page to open pop up i want to open 5 pop up on a click in a loop and automatically close all the pop up after a interval of time suggest your solution
Posted

1 solution

C#
<script type="text/javascript">
    var win = window.open("http://www.google.com", "mywindow");
    var interval;
    function closePopup()
    {
        win.close();
        clearInterval(interval);
    }
    interval=setInterval(closePopup,10000);
</script>


I think this is a common task. Haven't googled yet?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900