Hi all,
I'm new to JavaScript, but am pretty sure what I want to accomplish is
not that difficult. I just need an example or suggestion to help
clarify it for me - I haven't had much time to learn JS, so I have
been using some prebuilt scripts where needed.
I have a Web page form where a user can enter data. The first step is
for them to select a dropdown menu to indicate the number of entries
they will be making (the dropdown menu provides options of 5, 10, 25,
50, and 100). They may or may not actually enter that number (in other
words, they may choose 5 and only enter 2, so there would be 3 blank
rows). This then gives them a series of blank text boxes and they
enter the appropriate information (first name, last name, SSN, hours,
wages), such as:
Tim Jones 123-45-6789 40.0 1,275.00
Bob Stark 345-67-8901 32.0 1,002.75
(blank)
(blank)
(blank)
---------- ---- --------
Totals: 2 72.0 2,277.75
At the bottom of the form is a row where I'd like to provide totals
(dynamically) as they enter data. The first total would be the # of
names entered, the second total would be hours, and the third total
would be wages.
I need a script that will count the number of rows in the text column
(with data only) and add the values in the numeric columns, changing
the value in the Totals row as entries are made (or removed).
Any examples or suggestions are greatly appreciated.
TIA,
Yellowbird
I'm new to JavaScript, but am pretty sure what I want to accomplish is
not that difficult. I just need an example or suggestion to help
clarify it for me - I haven't had much time to learn JS, so I have
been using some prebuilt scripts where needed.
I have a Web page form where a user can enter data. The first step is
for them to select a dropdown menu to indicate the number of entries
they will be making (the dropdown menu provides options of 5, 10, 25,
50, and 100). They may or may not actually enter that number (in other
words, they may choose 5 and only enter 2, so there would be 3 blank
rows). This then gives them a series of blank text boxes and they
enter the appropriate information (first name, last name, SSN, hours,
wages), such as:
Tim Jones 123-45-6789 40.0 1,275.00
Bob Stark 345-67-8901 32.0 1,002.75
(blank)
(blank)
(blank)
---------- ---- --------
Totals: 2 72.0 2,277.75
At the bottom of the form is a row where I'd like to provide totals
(dynamically) as they enter data. The first total would be the # of
names entered, the second total would be hours, and the third total
would be wages.
I need a script that will count the number of rows in the text column
(with data only) and add the values in the numeric columns, changing
the value in the Totals row as entries are made (or removed).
Any examples or suggestions are greatly appreciated.
TIA,
Yellowbird
Comment