1

I have a javascript countdown timer that displays text when it expires. I would like to have it redirect to a different URL instead. Does anyone have any thoughts on how I can alter the code to achieve this? Your help is appreciated...

expire: function(idxs){
for(var x in idxs) {
this.display(this.counts[idxs[x]], "Your timer is expired...");
this.counts.splice(idxs[x], 1);
}
},
KevMoe
  • 443
  • 4
  • 21

2 Answers2

0

Just add a redirect inside your expire function.

window.location = "http://www.yoururl.com";
user1289451
  • 911
  • 8
  • 22
0

You can do this with window.location.href = ....

Please see this question: How to get browser to navigate to URL in Javascript?

Community
  • 1
  • 1
Deividas
  • 6,437
  • 2
  • 26
  • 27