Jhonatan Rico Jhonatan Rico - 1 year ago 76
jQuery Question

VM456:22 Uncaught ReferenceError: wndow is not defined

I am new at javascript, I am trying to make a script to reload a web page after some time but when the time is complete the error shows up and it does not reload the page.

var url = window.location.href;
console.log("My url: "+url);
console.log("Ten seconds");
setTimeout(function(){reload();}, 10000);

function reload(){
console.log("Refreshing to... " + url);
wndow.location.href = url;

I do not know what to do :(

Answer Source

You have a spelling mistake.

wndow.location.href = url;

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download