Click to See Complete Forum and Search --> : looping and form validation.


andycharger
05-07-2003, 05:47 PM
Help!
I have a huge form that has over 100 text boxes on it and all must be filled in. Basically, to give you somebackground, its a golf course scorecard. There are 7 columns to check and 18 rows.
I want to check each box. I was thinking, I could pass the input boxname and then a number to check so it does a big loop.
Is this possible and could someone provide me with the code to do so?

i.e here is what im starting with.

function validate()
{
var form = document.addScore;
var i = 1
do

{

if(form.yellowtee+i.value == 0){
alert("You must enter a value to yellow tee box" + i)
return(false);
}
else
{

}


While
{ i < 18
}
}

I hope this gives you some idea.

HELP!

Andy

khalidali63
05-07-2003, 05:56 PM
do you happen to have a link to your page or test page?..it will be easy to see rest of your logic flow and create a solution.if not a link then upload yur html page as a text file