jamesh1031
asked on
Sort HTML Table
I'm trying to use the sort feature in this article: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndude/html/dude07232001.asp
This article explains how to highlight rows, sort rows and move columns. I have no problem with the highlight, but when I try to sort I get little white boxes under or beside my column headers and when I click to sort i get a runtime error telling me the column contents (the first row of the column contents) in undefined.
I wonder if my span tags are the problem.
Here is part of the code:
<table style="BEHAVIOR: url(sort.htc);BORDER-COLLA PSE: collapse" slcolor='#FFFFFF' hlcolor='#D0E4f7'
border="0" bordercolor="#111111" id="AutoNumber1" width="100%" cellpadding="0">
<THEAD>
<tr>
<% if not ReadOnlyActive then %>
<td width="25"><span style="PADDING-LEFT: 1px; FONT-SIZE: 8pt; OVERFLOW: visible; COLOR: #0000ff; FONT-FAMILY: Tahoma">Out</span></td>
<td width="35"><span style="PADDING-LEFT: 1px; FONT-SIZE: 8pt; OVERFLOW: visible; COLOR: #0000ff; FONT-FAMILY: Tahoma">Move</span></td>
<%end if %>
<td width="54"><span style="PADDING-LEFT: 1px; FONT-SIZE: 8pt; OVERFLOW: visible; COLOR: #0000ff; FONT-FAMILY: Tahoma">Carrier</span></td >
etc. to </THEAD>
<TBODY>
<tr>
<% if not ReadOnlyActive then %>
<td width="25" height="20"><a href="..\movementpages\mov ement.aspx ?PageMode= Outbound&a mp;Trailer SCAC=<%=rs .TrailerSC AC%>&T railerID=< %=rs.Trail erID%>" style="PADDING-LEFT: 1px; LEFT: 0.031in; OVERFLOW: hidden; WIDTH: 16px; CURSOR: hand; COLOR: #ff0000; TOP: 0in; HEIGHT: 16px">O*</a></td>
<td width="35" height="20"><a href="..\movementpages\mov ement.aspx ?PageMode= Move&T railerSCAC =<%=rs.Tra ilerSCAC%> &Trail erID=<%=rs .TrailerID %>" style="PADDING-LEFT: 1px; LEFT: 0.031in; OVERFLOW: hidden; WIDTH: 16px; CURSOR: hand; COLOR: #ff0000; TOP: 0in; HEIGHT: 16px">M*</a></td>
<%end if %>
<td width="54" height="20"><span style="PADDING-LEFT: 1px; FONT-SIZE: 8pt; OVERFLOW: visible; COLOR: black; FONT-FAMILY: Tahoma"><%=rs.CarrierSCAC% ></span></ td>
<td width="54" height="20"><span style="PADDING-LEFT: 1px; FONT-SIZE: 8pt; OVERFLOW: visible; COLOR: black; FONT-FAMILY: Tahoma"><%=rs.TrailerSCAC% ></span></ td>
etc. </TBODY>
This article explains how to highlight rows, sort rows and move columns. I have no problem with the highlight, but when I try to sort I get little white boxes under or beside my column headers and when I click to sort i get a runtime error telling me the column contents (the first row of the column contents) in undefined.
I wonder if my span tags are the problem.
Here is part of the code:
<table style="BEHAVIOR: url(sort.htc);BORDER-COLLA
border="0" bordercolor="#111111" id="AutoNumber1" width="100%" cellpadding="0">
<THEAD>
<tr>
<% if not ReadOnlyActive then %>
<td width="25"><span style="PADDING-LEFT: 1px; FONT-SIZE: 8pt; OVERFLOW: visible; COLOR: #0000ff; FONT-FAMILY: Tahoma">Out</span></td>
<td width="35"><span style="PADDING-LEFT: 1px; FONT-SIZE: 8pt; OVERFLOW: visible; COLOR: #0000ff; FONT-FAMILY: Tahoma">Move</span></td>
<%end if %>
<td width="54"><span style="PADDING-LEFT: 1px; FONT-SIZE: 8pt; OVERFLOW: visible; COLOR: #0000ff; FONT-FAMILY: Tahoma">Carrier</span></td
etc. to </THEAD>
<TBODY>
<tr>
<% if not ReadOnlyActive then %>
<td width="25" height="20"><a href="..\movementpages\mov
<td width="35" height="20"><a href="..\movementpages\mov
<%end if %>
<td width="54" height="20"><span style="PADDING-LEFT: 1px; FONT-SIZE: 8pt; OVERFLOW: visible; COLOR: black; FONT-FAMILY: Tahoma"><%=rs.CarrierSCAC%
<td width="54" height="20"><span style="PADDING-LEFT: 1px; FONT-SIZE: 8pt; OVERFLOW: visible; COLOR: black; FONT-FAMILY: Tahoma"><%=rs.TrailerSCAC%
etc. </TBODY>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Get the simple table working with the sorter then try applying the style and scripts to it