struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From McShiv <>
Subject Script Error
Date Tue, 05 Feb 2008 14:22:12 GMT

Hi All,

     I'm using the forllowing javascript and HTML Code for my project. I
need to change the selectedRow text value (from 0 to 1) and other rows to 0
(indicating 1-selected row 0-unselectedrow). Because of using innerText in
the JavaScript, the textbox is changed as label. There is any other keywords
availabe to change the text box value during the onMouseDown operation?
Please send any example code for clarification. Thanks.

JavaScript Code

         function selectRow(row)
	alert('Inside Select Row');
	var tbl  = document.getElementById('WorkingList');
	var cmpStr = '0'
	var rows = tbl.getElementsByTagName('TR');
	for (var rowNum = 1; rowNum < rows.length; rowNum++)
		var celTD = rows[rowNum].getElementsByTagName('TD');
		if(celTD[0].innerText != cmpStr)
			celTD[0].innerText = '0';
	var celTDselected = row.getElementsByTagName('TD');
	celTDselected[0].innerText = '1';


         <logic:iterate name="formsForm" property="formsVO" id="formsVO">
	<tr onMouseDown = "selectRow(this)">
			<html:text name="formsVO" property="selectedRow" indexed="true"/>
			<html:text name="formsVO" property="formId" indexed="true"/>
			<bean:write name="formsVO" property="formNumber"/>
			<bean:write name="formsVO" property="formTitle"/>
			<bean:write name="formsVO" property="editionDate"/>


View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message