I have a web page where I need to display popup (basically a event reminder). My user can set multiple reminder from my application. I have created a script for it but it is showing only first event reminder popup not all.
I have created one demo code which I can show here the same concept I have applied in my code.
<script>
$(function()
{
setInterval(function(){
for(i=0; i<3;i++)
{
var url = 'http://www.rediff.com';
var w = 550;
var h= 435;
var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);
window.open(url,'newwindow','width='+w+', height='+h+', top='+top+', left='+left);
}
}
, 10000);
});
</script>
If I remove the setinterval function from my script and run the page, it is showing me 3 popup of the URL: http://www.rediff.com simultaneously. But after applying setinterval it is showing me only one popup not 3 as in case 1st( i.e without setinterval). Why?