I don't want to use another library as it takes too long to learn them.
I almost have it working from various examples found, can you help w
with this?
Actual oXMLHTTP.responseText returned:
<td class="even1"><input type="hidden" value="Cole Hamel" name="name[]" size="40"/>Cole Hamel</td>
<td class="even1"><input type="text" name="jersey[]" size="3"/></td>
<td class="even1"><input type="hidden" value="14" name="age[]" size="40"/>14</td>
<td class="odd1">David Wells</td>
<td class="odd1">4</td>
<td class="odd1">0</td>
<td class="even1">Brad Lidge</td>
<td class="even1">14</td>
<td class="even1">0</td>
<td class="odd1">Roger Clemens</td>
<td class="odd1">21</td>
<td class="odd1">0</td>
<td class="even1">Randy Johnson</td>
<td class="even1">22</td>
<td class="even1">0</td>
<td class="odd1">Chad Qualls</td>
<td class="odd1">26</td>
<td class="odd1">0</td>
<td class="even1">Mariano Rivera</td>
<td class="even1">29</td>
<td class="even1">0</td>
<td class="odd1">Andy Pettitte</td>
<td class="odd1">31</td>
<td class="odd1">0</td>
<td class="even1">Roy Oswalt</td>
<td class="even1">32</td>
<td class="even1">0</td>
<td class="odd1">Nolan Ryan</td>
<td class="odd1">34</td>
<td class="odd1">0</td>
<td class="even1">Bob Gibson</td>
<td class="even1">42</td>
<td class="even1">0</td>
Replacing innerHTML like this:
// Get the table
var tabBody = document.getElementById("playertablebody");
// Create an empty Row
var row = document.createElement("TR");
/*
The responseText of the oXMLHTTP object has the rows of the existing
roster in it already HTML formatted.
*/
var response = oXMLHTTP.responseText;
row.innerHTML = response;
// Append the Row created
tabBody.appendChild(row);
Source of the table:
<table width="400" cellspacing="0" cellpadding="1" border="0" class="playertable">
<tbody>
<tr>
<th width="300" align="center" class="stheader1">Player Name</th>
<th width="50" align="center" class="stheader1">Jersey</th>
<th width="50" align="center" class="stheader1">Age</th>
</tr>
</tbody>
<tbody id="playertablebody">
<tr>joe pitcher1314</tr>
<tr>
<input type="hidden" value="Cole Hamel" name="name[]" size="40"/>Cole Hamel
<input type="text" name="jersey[]" size="3"/>
<input type="hidden" value="14" name="age[]" size="40"/>14
David Wells40
Brad Lidge140
Roger Clemens210
Randy Johnson220
Chad Qualls260
Mariano Rivera290
Andy Pettitte310
Roy Oswalt320
Nolan Ryan340
Bob Gibson420
</tr>
</tbody>
</table>
Where are my TD tags????