0

Hi all

On my jsp page i m having two tables..
first table have 14 rows which takes input type=text.

and

my second table is having 9 rows which also takes 9 inputs.

Thus total 23 inputs on a form..
Now when the user click submit, i want to check if total of 20 inputs are fill or less than that..
Means user can input max 20 inputs from both the tables..

plz reply for such validation..

Thanks..

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by abhi287
0

Hi
try this:
-let an input element is haveing name='name' and id='id'
-get the element by
var elem=document.form1.name
if form1 is name of form
or
var elem=document.getElementById('id');
-after that check elem.value.lenght is 0 or what
-on the basis of above you can check other input element also
-use good logic to do this for all input element

have a nice day !

0

i know the script and hoe to access the input field..
but i want the count for how much fields are entered and then to check if it is less than 20..

so how i'll increase the count if the field is filled ..
or somethig another logic..

plz reply..
thanks

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.