Buenos dias actualmente tengo una aplicacion .net mvc donde en una vista tengo varias tablas y el objetivo es poder obtener todos los datos de todas las tablas, este es mi codigo html para una de las tablas:
<div name="7488" id="7488" control-type="TIssFormTable">
<div class="box">
<div class="box-header">
<div class="bootstrap-table">
<div class="fixed-table-container">
<div class="fixed-table-header">
</div>
<div class="fixed-table-body">
<div class="fixed-table-loading">Loading, please wait...</div>
<table id="table-7488" data-toggle="table" data-click-to-select="true" data-
pagination="true" class="table-hover table-responsive table">
<thead><tr id="column-7488">
<th data-sortable="true" width="350">
<div class="th-inner sortable both">Problem</div>
<div class="fht-cell"></div></th><th data-sortable="true" width="50">
<div class="th-inner sortable both">None</div>
<div class="fht-cell"></div></th><th data-sortable="true" width="50">
<div class="th-inner sortable both">Mild</div>
<div class="fht-cell"></div></th><th data-sortable="true" width="50">
<div class="th-inner sortable both">Moderate</div>
<div class="fht-cell"></div></th><th data-sortable="true" width="50">
<div class="th-inner sortable both">Severe</div>
<div class="fht-cell">
</div></th></tr></thead>
<tbody id="tbody-7488">
<tr id="value-0-7488">
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true">DEPRESSED MOOD</td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true">R</td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true">J</td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
</tr>
<tr id="value-1-7488">
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true">MOOD SWINGS</td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
</tr>
<tr id="value-2-7488">
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true">IRRITABILITY</td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
</tr>
<tr id="value-3-7488">
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true">POOR CONCENTRATION</td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true">t</td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
</tr>
<tr id="value-4-7488"><td class="input-details" data-field="TIssFormTable-
7488" ''="" contenteditable="true">AGITATION</td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true">A</td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
</tr>
<tr id="value-5-7488">
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true">SLEEP DISTURBANCE</td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
</tr>
<tr id="value-6-7488">
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true">FATIGUE/LOW ENERGY</td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
<td class="input-details" data-field="TIssFormTable-7488" ''=""
contenteditable="true"></td>
</tr>
<tfoot>
<tr></tr></tfoot>
</table> <div class="fixed-table-footer"></div> <div class="fixed-table-
pagination"></div>
</div></div></div></div></div></div>
<table id="table-7587" data-toggle="table" data-click-to-select="true" data-
pagination="true" class="table-hover table-responsive table">
<thead>
<tr id="column-7587">
<th data-sortable="true" width="250">
<div class="th-inner sortable both">Medication</div>
<div class="fht-cell"></div>
</th><th data-sortable="true" width="50">
<div class="th-inner sortable both">DosageFreq</div>
<div class="fht-cell"></div></th>
<th data-sortable="true" width="50">
<div class="th-inner sortable both">StartDate</div>
<div class="fht-cell"></div></th><th data-sortable="true" width="250">
<div class="th-inner sortable both">Purpose</div>
<div class="fht-cell"></div></th></tr></thead>
<tbody id="tbody-7587">
<tr id="value-0-7587">
<td class="input-details" data-field="TIssFormTable-7587" ''=""
contenteditable="true">
</td><td class="input-details" data-field="TIssFormTable-7587" ''=""
contenteditable="true">
</td><td class="input-details" data-field="TIssFormTable-7587" ''=""
contenteditable="true"></td>
<td class="input-details" data-field="TIssFormTable-7587" ''=""
contenteditable="true"></td>
</tr>
<tr id="value-1-7587">
<td class="input-details" data-field="TIssFormTable-7587" ''=""
contenteditable="true"></td>
<td class="input-details" data-field="TIssFormTable-7587" ''=""
contenteditable="true"></td>
<td class="input-details" data-field="TIssFormTable-7587" ''=""
contenteditable="true"></td>
<td class="input-details" data-field="TIssFormTable-7587" ''=""
contenteditable="true"></td>
</tr></tbody><tfoot><tr></tr></tfoot></table>
Tengo 2 tablas que tienes datos y otras 4 que en estos momentos no tienen dato cuando pongo el codigo javascript no me toma los datos de las tablas que estan vacias solo me repite los datos de la tabla que tiene elementos.
Y he intentado con esto para probar y no me funciona:
$('#table-7488 tr').each(function() {
var field = $(this).find("td:first").html();
});
:first
que pasa?