form validation

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Dec 2007
Posts: 28
Reputation: abhi287 is an unknown quantity at this point 
Solved Threads: 0
abhi287 abhi287 is offline Offline
Light Poster

form validation

 
0
  #1
Mar 7th, 2008
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..
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 483
Reputation: DangerDev has a spectacular aura about DangerDev has a spectacular aura about 
Solved Threads: 59
DangerDev's Avatar
DangerDev DangerDev is offline Offline
Posting Pro in Training

Re: form validation

 
0
  #2
Mar 7th, 2008
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 !
Freedom in the Mind, Faith in the words.. Pride in our Souls...
Indian Developer
http://falaque.wordpress.com/
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 28
Reputation: abhi287 is an unknown quantity at this point 
Solved Threads: 0
abhi287 abhi287 is offline Offline
Light Poster

Re: form validation

 
0
  #3
Mar 8th, 2008
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 1208 | Replies: 2
Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC