I have tried a half dozen ways to open a page in the same tab upon clicking a button and none of them work on FireFox or Edge:
window.location ="advance.html";
nothing happens
window.location ="/advance.html";
nothing happens
window.location.href ="advance.html";
nothing happens
window.location.href ="/advance.html";
nothing happens
window.open("advance.html", _self);
nothing happens
window.open("advance.html");
opens page in new tab
Been working on it for an hour trying every suggestion and nothing works.
What am I missing here?
EDIT: Since people are asking for the context (I know the username and password are in plain text, I'm just trying to get this part working first):
<script language="javascript">
function goHome()
{
window.location = 'index.html';
};
function login(form)
{
if(form.company.value == "advance" && form.password.value == "1234")
{
window.location.href ="advance.html";
}
else if(form.company.value == "" || form.password.value == "")
{
}
else
{
alert("Incorrect Usename/Password combination please try again.");
form.password.value = "";
}
}