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....

[344 byte] By [javarocktheworlda] at [2007-11-27 0:56:17]
# 1
dammit, I'm too late for this urgent problem
georgemca at 2007-7-11 23:29:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 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

--

radicjesa at 2007-7-11 23:29:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Hi,check for validation and if true then redirect using response.sendRedirect(URL);else pop up the screen
Chellama at 2007-7-11 23:29:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
Crosspost: http://forum.java.sun.com/thread.jspa?threadID=5160184&tstart=0
BalusCa at 2007-7-11 23:29:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...