I am trying to make a time sheet which can have multiple entries, so I have the following table set up, however, I am unsure how I would go about running the same function for every "total" element.
<table width="100%" id="table" border="0">
<tr id="headers">
<td width="15%">Name</td>
<td width="15%">Info</td>
<td width="10%">Monday</td>
<td width="10%">Tuesday</td>
<td width="10%">Wednesday</td>
<td width="10%">Thursday</td>
<td width="10%">Friday</td>
<td width="10%">Total</td>
</tr>
<tr id="1">
<td width="15%">
<input name="name1" id="name1">
</td>
<td width="15%">
<input name="info1" id="info1">
</td>
<td width="10%">
<input name="mo1" id="mon1">
</td>
<td width="10%">
<input name="tue1" id="tue1">
</td>
<td width="10%">
<input name="wed1" id="wed1">
</td>
<td width="10%">
<input name="thu1" id="thu1">
</td>
<td width="10%">
<input name="fri1" id="fri1">
</td>
<td width="10%" id="total1"></td>
</tr>
<tr id="2">
<td width="15%">
<input name="name2" id="name2">
</td>
<td width="15%">
<input name="info2" id="info2">
</td>
<td width="10%">
<input name="mon2" id="mon2">
</td>
<td width="10%">
<input name="tues2" id="tue2">
</td>
<td width="10%">
<input name="wed2" id="wed2">
</td>
<td width="10%">
<input name="thu2" id="thu2">
</td>
<td width="10%">
<input name="fri2" id="fri2">
</td>
<td width="10%" id="total2"></td>
</tr>
<!-- More here -->
</table>
So, what will happen is people will put the information in the input fields, and then the id="total[i]"
will calculate the total for the week. However, without doing a separate function for 1, 2, 3, etc. I have no idea how I'd be able to do a for loop for them.