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..

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 !

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.