Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sort table but ignore thead and tfoot

Status
Not open for further replies.

mickeyg

Technical User
Mar 30, 2001
120
US
I have tried unsuccessfully to modify the standard table sort routine ( to ignore anything inside of thead and tfoot tags.

The issue is I have a multi-row header and repeat it as a footer that keeps getting resorted instead of just resorting my data rows.

Any assistance is appreciated,
Mickey
 
Hmmm.... I have an idea, but it would be helpful if you could post a link to somewhere where you've got a table with header and footer and all that set up already, so I have somewhere to start from. Do you have a link to such a thing? ....or can you post your code?

--Dave


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
O Time, Strength, Cash, and Patience! [infinity]
 
Table code looks like this...
<table class="datatable" id="datatable" cellspacing="0" cellpadding="0">
<thead>
<tr>
<td class="columnheaderfirst" rowspan="2"><a href="javascript: sortTable(0)">Publication</a></td>
<td class="columnheader" rowspan="2"><a href="javascript: sortTable(1)">Route</a></td>
<td class="columnheader" rowspan="2">Description</td>
<td colspan="2" class="columndateheader"><a href="javascript:void(0)" onClick="columns('enable','column','1');" title="Edit"><img src="pencil.gif" id="edittopbtn1" border="0" alt="Edit Returns For This Day"></a><br>
Mon&nbsp;02/23</td>
<td colspan="2" class="columndateheader"><a href="javascript:void(0)" onClick="columns('enable','column','2');" title="Edit"><img src="pencil.gif" id="edittopbtn2" border="0" alt="Edit Returns For This Day"></a><br>
Tue&nbsp;02/24</td>
<td colspan="2" class="columndateheader"><a href="javascript:void(0)" onClick="columns('enable','column','3');" title="Edit"><img src="pencil.gif" id="edittopbtn3" border="0" alt="Edit Returns For This Day"></a><br>
Wed&nbsp;02/25</td>
<td colspan="2" class="columndateheader"><a href="javascript:void(0)" onClick="columns('enable','column','4');" title="Edit"><img src="pencil.gif" id="edittopbtn4" border="0" alt="Edit Returns For This Day"></a><br>
Thu&nbsp;02/26</td>
<td colspan="2" class="columndateheader"><a href="javascript:void(0)" onClick="columns('enable','column','5');" title="Edit"><img src="pencil.gif" id="edittopbtn5" border="0" alt="Edit Returns For This Day"></a><br>
Fri&nbsp;02/27</td>
<td colspan="2" class="columndateheader"><a href="javascript:void(0)" onClick="columns('enable','column','6');" title="Edit"><img src="pencil.gif" id="edittopbtn6" border="0" alt="Edit Returns For This Day"></a><br>
Sat&nbsp;02/28</td>
<td colspan="2" class="columndateheader"><a href="javascript:void(0)" onClick="columns('enable','column','7');" title="Edit"><img src="pencil.gif" id="edittopbtn7" border="0" alt="Edit Returns For This Day"></a><br>
Sun&nbsp;03/01</td>
<td class="columnheaderlast">Week<br>Total</td>
</tr>
<tr>
<td class="columnsubheader" id="drawheader_1">Draw</td>
<td class="columnsubheader" id="returnsheader_1">Returns</td>
<td class="columnsubheader" id="drawheader_2">Draw</td>
<td class="columnsubheader" id="returnsheader_2">Returns</td>
<td class="columnsubheader" id="drawheader_3">Draw</td>
<td class="columnsubheader" id="returnsheader_3">Returns</td>
<td class="columnsubheader" id="drawheader_4">Draw</td>
<td class="columnsubheader" id="returnsheader_4">Returns</td>
<td class="columnsubheader" id="drawheader_5">Draw</td>
<td class="columnsubheader" id="returnsheader_5">Returns</td>
<td class="columnsubheader" id="drawheader_6">Draw</td>
<td class="columnsubheader" id="returnsheader_6">Returns</td>
<td class="columnsubheader" id="drawheader_7">Draw</td>
<td class="columnsubheader" id="returnsheader_7">Returns</td>
<td class="columnheaderlast">&nbsp;</td>
</tr>
</thead>
<tbody>
<tr id="data_1" class="datarowodd">
<td class="nowrap">Daily Gazette</td>
<td class="nowrap">N2571</td>
<td class="nowrap">BOB WHITE CARRYOUT</td>
<td class="draw" id="draw_1_1">0</td>
<td id="returns_1_1"><input class="number" type="text" name="frm_rtn_1_1_02/23/98_Daily Gazette_N2571_no" value="0" size="4" maxlength="5" onfocus="this.select();" onblur="calcrow(document.returnsentry.frm_total_1,1);" disabled></td>
<td class="draw" id="draw_1_2">0</td>
<td id="returns_1_2"><input class="number" type="text" name="frm_rtn_1_2_02/23/98_Daily Gazette_N2571_no" value="0" size="4" maxlength="5" onfocus="this.select();" onblur="calcrow(document.returnsentry.frm_total_1,1);" disabled></td>
<td class="draw" id="draw_1_3">0</td>
<td id="returns_1_3"><input class="number" type="text" name="frm_rtn_1_3_02/23/98_Daily Gazette_N2571_no" value="0" size="4" maxlength="5" onfocus="this.select();" onblur="calcrow(document.returnsentry.frm_total_1,1);" disabled></td>
<td class="draw" id="draw_1_4">0</td>
<td id="returns_1_4"><input class="number" type="text" name="frm_rtn_1_4_02/23/98_Daily Gazette_N2571_no" value="0" size="4" maxlength="5" onfocus="this.select();" onblur="calcrow(document.returnsentry.frm_total_1,1);" disabled></td>
<td class="draw" id="draw_1_5">0</td>
<td id="returns_1_5"><input class="number" type="text" name="frm_rtn_1_5_02/23/98_Daily Gazette_N2571_no" value="0" size="4" maxlength="5" onfocus="this.select();" onblur="calcrow(document.returnsentry.frm_total_1,1);" disabled></td>
<td class="draw" id="draw_1_6">0</td>
<td id="returns_1_6"><input class="number" type="text" name="frm_rtn_1_6_02/23/98_Daily Gazette_N2571_no" value="0" size="4" maxlength="5" onfocus="this.select();" onblur="calcrow(document.returnsentry.frm_total_1,1);" disabled></td>
<td class="draw" id="draw_1_7">0</td>
<td id="returns_1_7"><input class="number" type="text" name="frm_rtn_1_7_02/23/98_Daily Gazette_N2571_no" value="0" size="4" maxlength="5" onfocus="this.select();" onblur="calcrow(document.returnsentry.frm_total_1,1);" disabled></td>
<td class="columntotal nowrap"><input class="rtntotal" type="text" name="frm_total_1" value="0" size="4" onfocus="blur();" readonly></td>
</tr>
<tr id="data_2" class="dataroweven">
<td class="nowrap">Daily Messenger</td>
<td class="nowrap">N3329</td>
<td class="nowrap">BOB WHITE CARRY OUT</td>
<td class="draw" id="draw_2_1">6</td>
<td id="returns_2_1"><input class="number" type="text" name="frm_rtn_2_1_02/23/98_Daily Messenger_N3329_yes" value="0" size="4" maxlength="5" onfocus="this.select();" onblur="calcrow(document.returnsentry.frm_total_2,2);" disabled></td>
<td class="draw" id="draw_2_2">6</td>
<td id="returns_2_2"><input class="number" type="text" name="frm_rtn_2_2_02/23/98_Daily Messenger_N3329_yes" value="0" size="4" maxlength="5" onfocus="this.select();" onblur="calcrow(document.returnsentry.frm_total_2,2);" disabled></td>
<td class="draw" id="draw_2_3">6</td>
<td id="returns_2_3"><input class="number" type="text" name="frm_rtn_2_3_02/23/98_Daily Messenger_N3329_yes" value="0" size="4" maxlength="5" onfocus="this.select();" onblur="calcrow(document.returnsentry.frm_total_2,2);" disabled></td>
<td class="draw" id="draw_2_4">0</td>
<td id="returns_2_4"><input class="number" type="text" name="frm_rtn_2_4_02/23/98_Daily Messenger_N3329_no" value="0" size="4" maxlength="5" onfocus="this.select();" onblur="calcrow(document.returnsentry.frm_total_2,2);" disabled></td>
<td class="draw" id="draw_2_5">0</td>
<td id="returns_2_5"><input class="number" type="text" name="frm_rtn_2_5_02/23/98_Daily Messenger_N3329_no" value="0" size="4" maxlength="5" onfocus="this.select();" onblur="calcrow(document.returnsentry.frm_total_2,2);" disabled></td>
<td class="draw" id="draw_2_6">6</td>
<td id="returns_2_6"><input class="number" type="text" name="frm_rtn_2_6_02/23/98_Daily Messenger_N3329_yes" value="0" size="4" maxlength="5" onfocus="this.select();" onblur="calcrow(document.returnsentry.frm_total_2,2);" disabled></td>
<td class="draw" id="draw_2_7">0</td>
<td id="returns_2_7"><input class="number" type="text" name="frm_rtn_2_7_02/23/98_Daily Messenger_N3329_no" value="0" size="4" maxlength="5" onfocus="this.select();" onblur="calcrow(document.returnsentry.frm_total_2,2);" disabled></td>
<td class="columntotal nowrap"><input class="rtntotal" type="text" name="frm_total_2" value="0" size="4" onfocus="blur();" readonly></td>
</tr>
</tbody>
<tfoot>
<tr>
<td class="columnfooterfirst">&nbsp;</td>
<td class="columnfooter">&nbsp;</td>
<td class="columnfooterlast">&nbsp;</td>
<td colspan="2" class="columndateheader"><a href="javascript:void(0)" onClick="columns('enable','column','1');" title="Edit"><img src="pencil.gif" id="editbottombtn1" border="0" alt="Edit Returns For This Day"></a><br>
Mon&nbsp;02/23</td>
<td colspan="2" class="columndateheader"><a href="javascript:void(0)" onClick="columns('enable','column','2');" title="Edit"><img src="pencil.gif" id="editbottombtn2" border="0" alt="Edit Returns For This Day"></a><br>
Tue&nbsp;02/24</td>
<td colspan="2" class="columndateheader"><a href="javascript:void(0)" onClick="columns('enable','column','3');" title="Edit"><img src="pencil.gif" id="editbottombtn3" border="0" alt="Edit Returns For This Day"></a><br>
Wed&nbsp;02/25</td>
<td colspan="2" class="columndateheader"><a href="javascript:void(0)" onClick="columns('enable','column','4');" title="Edit"><img src="pencil.gif" id="editbottombtn4" border="0" alt="Edit Returns For This Day"></a><br>
Thu&nbsp;02/26</td>
<td colspan="2" class="columndateheader"><a href="javascript:void(0)" onClick="columns('enable','column','5');" title="Edit"><img src="pencil.gif" id="editbottombtn5" border="0" alt="Edit Returns For This Day"></a><br>
Fri&nbsp;02/27</td>
<td colspan="2" class="columndateheader"><a href="javascript:void(0)" onClick="columns('enable','column','6');" title="Edit"><img src="pencil.gif" id="editbottombtn6" border="0" alt="Edit Returns For This Day"></a><br>
Sat&nbsp;02/28</td>
<td colspan="2" class="columndateheader"><a href="javascript:void(0)" onClick="columns('enable','column','7');" title="Edit"><img src="pencil.gif" id="editbottombtn7" border="0" alt="Edit Returns For This Day"></a><br>
Sun&nbsp;03/01</td>
<td class="columnfooterlast">Week<br>Total<br>
<input class="rtntotal" type="text" name="frm_grandtotal" value="0" size="4" onfocus="blur();" readonly></td>
</tr>
</tfoot>
</table>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top