Click here to Skip to main content
15,895,462 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
can any one help me

how to open a popup window automatically at different time interval of time by using mvc.

i want to show different alert box at different time interval

my code

XML
<script>


    //setTimeout(function () {
    //    alert("Time to remind you that only 45 minutes is left to complete your task"); }, 10000);
    function call() {
        popup = alert("Time to remind you that only 45 minutes is left to complete your task");
        setTimeout(wait, 8000);
    }
    function caller() {

        setInterval(call, 10000);
    }
    function wait() {
        popup.close();
    }


    </script>

<body onload="caller();">


    </body>
Posted
Updated 11-Dec-14 22:47pm
v3

 
Share this answer
 
if all you need is to show an alert after an interval you need to do something like this

JavaScript
setTimeout(function(){
  alert("Time to remind you that only 45 minutes is left to complete your task");
}, 8000);
 
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