Thanks for the reply. The following is the XSLT template that render the
table content, and Javascript that manipulate the values of the hidden
fields before submit. Thank you.
function fillTechRefreshForm()
{
var taskid = document.getElementById('txtTaskId').value;
if (taskid == "")
{
alert("Please select task id by clicking the radio button")
return false;
}
else
{
with (document.forms[0])
{
txtTaskId.value = document.getElementById('td' + taskid.toString() +
'1').innerText;
txtLastName.value = document.getElementById('td' + taskid.toString()
+ '9').innerText;
txtFirstName.value = document.getElementById('td' +
taskid.toString() + '10').innerText;
//cboUserName.value = document.getElementById('td' +
taskid.toString() + '2').innerText;
cboUserName.value = txtLastName.value + ", " + txtFirstName.value;
cboSerial.value = document.getElementById('td' + taskid.toString() +
'3').innerText;
txtScheduled.value = document.getElementById('td' +
taskid.toString() + '4').innerText;
txtReady.value = document.getElementById('td' + taskid.toString() +
'5').innerText;
txtDeployed.value = document.getElementById('td' + taskid.toString()
+ '6').innerText;
txtNewSystem.value = document.getElementById('td' +
taskid.toString() + '7').innerText;
txtComments.value = document.getElementById('td' + taskid.toString()
+ '8').innerText;
submit();
}
}
}
<!----XSLT---->
<xsl:when test="xyz/return/techrefreshs">
<xsl:if test="xyz/return/techrefreshs/recordcount = 0">
<div id="warning">No record match the criteria.</div>
</xsl:if>
<xsl:if test="xyz/return/techrefreshs/recordcount > 0">
<form action="techRefresh.asp" method="post"
onsubmit="return(fillTechRefreshForm())">
<table class="inventoryTable" cellpadding="0" cellspacing="0">
<tr>
<th> </th>
<th><!--checkbox--> </th>
<th><a href="javascript
:changeSort('org')" title="Order by
ORG">TASK ID</a></th>
<th><a href="javascript
:changeSort('ticketnum')" title="Order by
user#">USER</a></th>
<th><a href="javascript
:changeSort('ticketnum')" title="Order by
last name#">LAST NAME</a></th>
<th><a href="javascript
:changeSort('ticketnum')" title="Order by
first name">FIRST NAME</a></th>
<th><a href="javascript
:changeSort('c_last_name')" title="Order
by serial number">SERIAL</a></th>
<th><a href="javascript
:changeSort('c_first_name')" title="Order
by scheduled date">SCHEDULED</a></th>
<th><a href="javascript
:changeSort('type')" title="Order by ready
date">READY</a></th>
<th><a href="javascript
:changeSort('status')" title="Order by
deployed date">DEPLOYED</a></th>
<th><a href="javascript
:changeSort('open_date')" title="Order by
system">NEW<br/>SYSTEM</a></th>
<th>COMMENTS</th>
</tr>
<xsl:apply-templates
select="xyz/return/techrefreshs/techrefresh"/>
</table>
<input type="hidden" id="txtTaskId" name="txtTaskId"/>
<input type="hidden" id="cboUserName" name="cboUserName"/>
<input type="hidden" id="txtLastName" name="txtLastName"/>
<input type="hidden" id="txtFirstName" name="txtFirstName"/>
<input type="hidden" id="cboSerial" name="cboSerial"/>
<input type="hidden" id="txtScheduled" name="txtScheduled"/>
<input type="hidden" id="txtReady" name="txtReady"/>
<input type="hidden" id="txtDeployed" name="txtDeployed"/>
<input type="hidden" id="txtNewSystem" name="txtNewSystem"/>
<input type="hidden" id="txtComments" name="txtComments"/>
<input type="submit" id="btnAction" name="btnAction" value="Confirm
Selection"/>
</form>
</xsl:if>
</xsl:when>
<xsl:template match="techrefresh">
<xsl:variable name="rowNumber" select="position()" />
<xsl:variable name="taskid" select="taskid"/>
<tr>
<td style="color:#CCC;background-color:#003366"><xsl:value-of
select="$rowNumber"/></td>
<td align="center">
<input type="radio" id="rdoSelectedTask" name="rdoSelectedTask">
<xsl:attribute name="value"><xsl:value-of
select="$taskid"/></xsl:attribute>
<xsl:attribute
name="onclick">document.getElementById("txtTaskId" ).value=<xsl:value-of
select="$taskid"/></xsl:attribute>
</input>
</td>
<td align="center">
<xsl:attribute name="id">td<xsl:value-of
select="$taskid"/>1</xsl:attribute>
<xsl:value-of select="$taskid"/>
</td>
<td>
<xsl:attribute name="id">td<xsl:value-of
select="$taskid"/>2</xsl:attribute>
<xsl:value-of select="userlogin"/> 
</td>
<td>
<xsl:attribute name="id">td<xsl:value-of
select="$taskid"/>9</xsl:attribute>
<xsl:value-of select="lastname"/> 
</td>
<td>
<xsl:attribute name="id">td<xsl:value-of
select="$taskid"/>10</xsl:attribute>
<xsl:value-of select="firstname"/> 
</td>
<td>
<xsl:attribute name="id">td<xsl:value-of
select="$taskid"/>3</xsl:attribute>
<xsl:value-of select="serial"/> 
</td>
<td>
<xsl:attribute name="id">td<xsl:value-of
select="$taskid"/>4</xsl:attribute>
<xsl:value-of select="scheduled"/> 
</td>
<td>
<xsl:attribute name="id">td<xsl:value-of
select="$taskid"/>5</xsl:attribute>
<xsl:value-of select="systemready"/> 
</td>
<td>
<xsl:attribute name="id">td<xsl:value-of
select="$taskid"/>6</xsl:attribute>
<xsl:value-of select="systemdeployed"/> 
</td>
<td>
<xsl:attribute name="id">td<xsl:value-of
select="$taskid"/>7</xsl:attribute>
<xsl:value-of select="newsystem"/> 
</td>
<td>
<xsl:attribute name="id">td<xsl:value-of
select="$taskid"/>8</xsl:attribute>
<xsl:value-of select="comments"/> 
</td>
</tr>
</xsl:template>
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!