I have window.location.href = "forwardedpage.html";
in my script.js
page. It gives me an error saying not found. Any idea why this would not work. It is part of a function that is invoked when a button is clicked.
function buttonIsClicked(){
//var secretName = "abdul"
var inputName = document.getElementById("nameBox").value;
//We are going to use a pop-up "alert" window to display the user's name...
alert("Hello " + inputName + "! Redirecting to Google...");
//everything before this point works. When it comes to the following,
//it comes up with an error saying not found.
window.location.href = "forwardedpage.html"; // This forwards the user's browser to forwardedpage.html
}