Click to See Complete Forum and Search --> : Problem displaying results


thesandman999
06-15-2003, 10:00 AM
I am using some code to count the number of check boxes, that are selected. The code works fine, however the results currently display in an alert box. I would like to see the result placed in the table below under "number of magazines" column, when I push the count button. Follow link to page I am working on.

http://members.shaw.ca/thesandman999/counter.htm

There will eventually be 75 separate counters on this page with a table of 75 rows. I want each value to go in a new row of the table.

Any assistance is greatly appreciated. Please respond to this board or email ecj56@hotmail.com subject javascript forum.

Thank you in advance.

Sandman

Khalid Ali
06-15-2003, 10:51 AM
First of all add an id attribute to the table cell where you want the results to appear for e.g
<td width="33%" id="magNum"></td>

now replace this line( alert message)

alert("You selected " + total + " boxes.");

with this one

document.getELementById("magNum").innerHTML = total

thesandman999
06-15-2003, 03:21 PM
Hi again,

Thank you for the suggestion.

However it did not work. It gives an error.

http://members.shaw.ca/thesandman999/counter.htm

The first counter will give the error.

Any other suggestions? Or did I make an error myself.

Thanx

thesandman999
06-15-2003, 04:07 PM
Thanx to all

Now I know where to come for future coding problem solution.

Which I will have again!!