Below is my javascript function to authenticate a user... I wanna retain the form on login failure with the username/password textbox being blank.
function authenticate(form)
{
if (form.username.value == "Administrator" && form.password.value == "password")
{
window.open('OrderList.aspx')/*opens the target page while Id & password matches*/
}
else
{
alert("Error Password or Username")
$("#username").val("")
$("#password").val("")
form.????????????('Login.aspx')//so that it stays on the same page wihout reloading the page.
I tried window.open, but it opens another instance of the form.
/*displays error message*/
}
}