In the following code when the if condition is true then it should go to google.com but is isn't. I wanted the window to go to google.com as the ok in the alert box is pressed why this isn't working? What is the best way to do it?
if(("admin"===userid)&&("admin"===psw))
{
window.alert("Logged in Successfully!!!");
window.location.href="https://www.google.co.in";
x=x+1;
}