Hi, Rakesh.
The easiest way to do this is by using javascipt, because it seems to be
harder to pass these values between jsp files after the submission and you
need more bandiwdth. So i recommend you to do something like this:
<form id="foo" action="bla" onSubmit="return foobar()">
<input type=text name=txt1>
<input type=text name=txt2>
<input type=text name=txt3>
</form>
<script language="JavaScript">
function foobar() {
if ( (foo.txt1.value.value.length == 0) ||
(foo.txt2.value.value.length == 0) ||
(foo.txt3.value.value.length == 0) ) {
alert("please fill all of them");
return false;
}
foo.submit();
}
</script>
>From: Rakesh Bhat <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
> reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: How to validate?
>Date: Tue, 5 Sep 2000 19:19:17 +0530
>
>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
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
===========================================================================
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