function callme(form)
{
if(document.forms[0].elements[1].value==”ajax” && document.forms[0].elements[2].value==”ajax”)
{
window.location.href = “home.jsp”
//document.location.href=”
}
else
{
alert(“——–“);
}
}
I need the above code to check username and password. If they are correct then it goes to home.jsp otherwise it shows an alert box. Here the location.href wont work. Why it happens so? I have also tried window.open..it works. but i need a page to be open by overwrite the existing window and not a new one. How can i do this . Any help regard this would be appreciated…