Posted on 2006-05-09
Firstly, apologies this Q is only worth 95 points, its all i have!
I have a db recordset, that pulls out 7 text fields for every record (one for each day of the week)
at the moment there are only 2 rows, so its not too difficult, but inthe future there will be anything from 2 to 100, so i need to make the page as dynamic as possible.
record 1 has the text fields named sun_1, mon_1, tue_1 etc
record 2 has the text fields name sun_2, mon_2, tue_2 etc
etc etc etc
I am adding all the texfields together to get a total for the week - adding sunday to saturday isnt a problem, as i pass all 7 values thro in the function.
the problem is when I try to add sun_1 and sun_2 etc together.
i cant really pass, a possible 700 varaibles into the javascrip function.
if i was using asp i'd use a counter and do something like
do while less than the number of rows in the record set
sun__total = sun_total + "sun_"&'
many thanks in advance