D
Doogie
I have xsl code that looks like this:
<table id="TblTrips" border="0" cellpadding="1" cellspacing="1">
<tr bgcolor="#AAAAAA">
<td width="0.7in" align="center"> <b><U>Status</U></b></td>
<td width="0.7in" align="center"><b><U>Accepted Trips</U></b></
td>
</tr>
<xsl:for-each select="trip_detail_info[@trip_status=
$statusFilter]">
<tr onclick="GetDetail(this.rowIndex, event)">
<td><xsl:value-of select="@trip_status"/></td>
<td><input type="checkbox"></input></td>
</tr>
</xsl:for-each>
The problem I'm running into is with the GetDetail javascript method
that I'm trying to use when the user clicks on a column in the grid
this xsl is tied to. Here is my javascript method:
function GetDetail(rowNum, evt)
{
var columnInfo = evt.srcElement || evt.target;
alert(columnInfo.cellIndex)
if (columnInfo.cellIndex >= 1)
{
var currentRow = TblTrips.rows(rowNum)
var trip = currentRow.cells[15].innerText
popupWindow = window.open('TripDetailInfo.aspx?trip_detail=' +
trip + '&cur_user=' + curuser);
}
}
The problem is that for the checkbox row, columnInfo.cellIndex returns
"undefined" but for the non-checkbox row the columnInfo.cellIndex
value returns 0 (as it should). Does anyone know why the checkbox
column reacts differently and what I can do to fix it?
<table id="TblTrips" border="0" cellpadding="1" cellspacing="1">
<tr bgcolor="#AAAAAA">
<td width="0.7in" align="center"> <b><U>Status</U></b></td>
<td width="0.7in" align="center"><b><U>Accepted Trips</U></b></
td>
</tr>
<xsl:for-each select="trip_detail_info[@trip_status=
$statusFilter]">
<tr onclick="GetDetail(this.rowIndex, event)">
<td><xsl:value-of select="@trip_status"/></td>
<td><input type="checkbox"></input></td>
</tr>
</xsl:for-each>
The problem I'm running into is with the GetDetail javascript method
that I'm trying to use when the user clicks on a column in the grid
this xsl is tied to. Here is my javascript method:
function GetDetail(rowNum, evt)
{
var columnInfo = evt.srcElement || evt.target;
alert(columnInfo.cellIndex)
if (columnInfo.cellIndex >= 1)
{
var currentRow = TblTrips.rows(rowNum)
var trip = currentRow.cells[15].innerText
popupWindow = window.open('TripDetailInfo.aspx?trip_detail=' +
trip + '&cur_user=' + curuser);
}
}
The problem is that for the checkbox row, columnInfo.cellIndex returns
"undefined" but for the non-checkbox row the columnInfo.cellIndex
value returns 0 (as it should). Does anyone know why the checkbox
column reacts differently and what I can do to fix it?