can anyone tell me what is it that I am doing wrong in this code?
This should take me to the page if the password is ioncorrect but instead the browser says page not found
alert("Invalid username & password")
i also tried window.location = "asdasd.html", it dosent work
Well, for one you have to have the file in the same directory as the link it's coming from. Otherwise you have to write the whole thing: http://....../../wrongpage.html
That's a bit oversimplified, but hits on the problem. It sounds as though the page isn't in the same directory as the script. You can use absolute URLs as mburt suggested, or, preferably, you can use relative URLs like "../wrongpage.html".