On Tuesday 13 November 2007 20:48, Dinesh Nidamanuru 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...!!!!
>
>
>
> Its not how you fall, but how you pick yourself up again..
>
> Regards
> Dinesh.N

Hi Dinesh

You will have to use JavaScript to checheck whether the field is filled or 
not. Once you create a function that checkes whether the field has been 
filled or not and returns true or false accordingly, you can call the 
function as follows
 <form name=form action="newconnectioncontroller" method=post onSubmit="return 
func();">

where func() is the function that validates the field.

Thanks

AP

Reply via email to