Jhonatan Rico Jhonatan Rico - 6 months ago 28
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 :(


You have a spelling mistake.

wndow.location.href = url;