On Nov 13, 2007 8:48 PM, Dinesh Nidamanuru <[EMAIL PROTECTED]> wrote:
> hi
>
>  I have a small doubt.
>  if we have a small piece of html & java code like below.
>
>  <form name=form action="newconnectioncontroller" method=post >
>  <input type=text name=xyz>
>
>  <input type=submit value="submit" onclick= ??? >
>
>  my doubt is..the page should not be redirected to class until we validate
> the feild in the text bar,i.e; we shuld check whether the field is filled up
> by the user or not......
>  i am not able to write the code for that.it is a part of my prj...can u
> help me out...!!!!


You can do validation at client -  ie. browser - using javascript
and/or at server side, in your javacode.
For client side validation check following links but for real world
application, you should do both.

[1] http://www.w3schools.com/jsref/jsref_onsubmit.asp
[2] In your code you can try replacing type=submit to type=button and
submiting form through the onClick event of the button.

HTH
Krishna

Reply via email to