Hello, I am working on a school project. I have been trying for days for this to work but it seems as though I can't get it to work. I am trying to add of interactivity to a login.html page. I have a username, a password and a submit button. I wan't the page to go to a new URL when the right combination of username and password is entered. But it seems as though I can't get it to work.

Here is some of my code here

function validateForm()
{

if(document.forms["login"]["usernameTB"].value==null || document.forms["login"]["passwordTB"].value==null)
{
alert("The username or password field must be filled out");


}


if(document.forms["login"]["usernameTB"].value=="gabby" && document.forms["login"]["passwordTB"].value=="blue")
{

}
else if(document.forms["login"]["usernameTB"].value="logie" && document.forms["login"]["passwordTB"].value=="blue")
{

}
else if(document.forms["login"]["usernameTB"].value="danny" && document.forms["login"]["passwordTB"].value=="blue")
{

}
else if(document.forms["login"]["usernameTB"].value=="brandon" && document.forms["login"]["passwordTB"].value=="blue")
{

}
else
{
alert("Either the username or password is wrong. Please try again");

}

}
-------------------------------------------------------
<form name="login" action="" method="post" onsubmit="validateForm()">


-------------------------------------

I don't have anything between the if statements just now
but before I have tried

1)window.location('categories.html');

2)window.location == "categories.html';

3)window.location.href == "categories.html";

4)window.parent.href=="categories.html";

5) return true, witht the action in the form set to "categories.html

------------------------

any time I set the action for my form as the name of the URL i want it to go to.. it always goes to the URL regardless of if the username and password are correct or not..

please help..