struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From McShiv <rajesh_sachi...@yahoo.co.in>
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';
	document.retrieveFormGenInfo.submit();
}

HTML Code

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


Thanks,
McShiv.....

-- 
View this message in context: http://www.nabble.com/Script-Error-tp15291018p15291018.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message