Hi .
You need to use client side scripting(javascript) for this
example
<html>
<head>
<script>
function validateForm(){
if (( document.testForm.txt1.value=="") ||(
document.testForm.txt2.value=="") || (document.testForm.txt3.value=="") ){
alert("please enter all values to continue");
return false;
}
else {
document.testForm.submit();
return true;
}
}
</script>
</head>
<body>
<form name="testForm" action="nextServlet" >
<input type="text" name="txt1" ><br>
<input type="text" name="txt2" ><br>
<input type="text" name="txt3" ><br>
<input type="submit" name="bttn" value="test" onClick="return
validateForm()">
</form>
</body>
</html>
> -----Original Message-----
> From: Rakesh Bhat [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, September 05, 2000 8:49 AM
> To: [EMAIL PROTECTED]
> Subject: How to validate?
>
> Hi all,
>
> I want to do the following task.Pls tell me how can i achieve it.
>
> 1)I have 3 input boxes.
> 2)I want the user to enter the value in all the input boxes.
> 3)If the user leaves a box unfilled , i want to indicate him that the
> field cannot
> be left as it is after he submits.(I want the previous values that he
> filled in
> other input boxes to stay as it was.)
>
> I am writing this in JSP. Do I need to use java script to validate? What
> r the
> steps i need to follow ?
>
> Thx in advance
> Rakesh
>
> ==========================================================================
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets