suresh pondicherry
asked on
javascript setinterval function
Hi,
Advance thanks for the efforts.
I am using setinterval in the javascript. The confirmation box appears exactly after 10 seconds (which is good) . But if i wait for 20 seconds, i could see one confirmation box and it doesn't matter which button (Ok or cancel) i click, i see other dialog immediately (instead of waiting another 10 seconds, the box appears immediately)
Also is there any way change button text 'Cancel' to 'Home'
Kind regards,
Pooja
Advance thanks for the efforts.
I am using setinterval in the javascript. The confirmation box appears exactly after 10 seconds (which is good) . But if i wait for 20 seconds, i could see one confirmation box and it doesn't matter which button (Ok or cancel) i click, i see other dialog immediately (instead of waiting another 10 seconds, the box appears immediately)
window.onload = function () {
setInterval(function () {
var r = confirm("Click OK to continue your session. Click Cancel to log out.");
if (r == true) {
}
else {
window.location.href = '@Url.Content("~/")';
}
}, 10000);
};
Also is there any way change button text 'Cancel' to 'Home'
Kind regards,
Pooja
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
How to change "Cancel" text.No way
ASKER
Thanks leakim971!
ASKER
It is working. How to change "Cancel" text.
Kind regards,
Pooja