urgent.......plz help....
hi all,
i m creating one small application for login in which user have to enter his/her email id and passward... if email is incorrect program will generate one pop-up of invalid id and passward and if it is correct thn redirect to next page.....
so how i put redirect condition on button click....
thnx in advance....
# 2
that's odd, usually it's a question how to catch the error...
You got a <form> (which you should use for this sort of things), it has a thing called "action", use that to redirect you to the next page.
It is really the question, how you should catch the error (you do that with an onclick method in submit).
For example:
--
//Layout start + content
...
//javascript code to check if there are invalid entries through validateForms() (which btw is not secure at all, you should catch it serverside)
...
<form action="validated.jsp" method="POST">
<input type="text" name="emailid" />
<input type="password" name="password" />
<input type="submit" name="submitForm" onclick="validateForms()" />
</form>
...
//Layout end
--