[Javascript] adding numerics in a table column
DeWayne Crenshaw
decren at yahoo.com
Fri Apr 27 14:30:38 CDT 2007
Thank you Peter Brunone & Nick Fitzsimons for your
input to this problem. I took a little advice here and
there and finally worked a solution. The problems as I
see them was (1)accessing the info contained in the
table - and since it's an add row/cell setup nothing
static can be accessed (2)along the same line, the
table did not contain any inputs such as text boxes -
so I could not force unique id's (3)Once accessed each
cell in a column had to be added together (4)That
total value had to then be put somewhere.
After much time on the i-net I discovered that this
specific problem has not been addressed but I did find
various codes that I tried to modify to fit - nothing
even came close until I stumbled on a table located
at:
http://4umi.com/web/javascript/tablesum.htm
Using that entire function I was able to make it do
what I wanted but it would end up changing the last
row info into the sum-up row, thus destroying the
input data that had been placed on that last row.
The solution was to add a hard-coded footer row - but
you can't call it a <tfoot> or it won't work - and I
had to eliminate all <span> tags to make it work.
As of this moment I still don't have the column total
going to the text box in table3 but that will be an
easy task.
One last thing: I discovered (in IE anyway) you can
make a button do more than one onClick event, but in
so doing you will get different results depending on
which onClick event is listed first.
Anyway, the page/form has a long way to go so I will
more than likely be asking for additional help.
Again thank you for your assistance,
DeWayne
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Javascript
mailing list