Check out my JavaScript snippet:
function chooseRow(objTR) {
for (i = 0; i < ddlModalityList.options.length; i++) {
if (ddlModalityList.options[i].text == objTR.cells[1].innerText.trim()) break;
}
ddlModalityList.options[i].selected = true;
txtSSAETitle.value = objTR.cells[2].innerText.trim();
txtSSName.value = objTR.cells[3].innerText.trim();
}
This code is part of a repeater. When a row is clicked, it sends the ID of the TR and displays the corresponding TD value in dropdown lists and textboxes. This code works smoothly in IE but encounters issues in Mozilla Firefox.
<tr onclick="chooseRow(this);">
<td class="csstablelisttd" style="display: none;" >
<%#Eval("Acq_Modality_ID")%>
</td>
<td class="csstablelisttd" >
<asp:Label ID="lblModality" runat="server" Text='<%#Eval("Modality")%>'></asp:Label>
</td>
<td class="csstablelisttd">
<asp:Label ID="lblSchdledStAETitle" runat="server" Text='<%#Eval("Scheduled_Station_AE_Title")%>'></asp:Label>
</td>
<td class="csstablelisttd">
<asp:Label ID="lblSchdleStationAEName" runat="server" Text='<%#Eval("SCHEDULED_STATION_NAME")%>'></asp:Label>
</td>
</tr>