Originally posted by Rodrigo Lopes: What happened when you tried window.location = "home.html"?
Here the window.location.href is not working.
What is not working? Are you getting an error message? Is the page reloading? Is the world catching on fire? We need some more details and you may want to show us how you are calling your function with a button, link, keyoress etc.