http://www.google.com/search?source=ig&hl=en&rlz=&q=set+textbox+value+javascript&btnG=Google+Search
On Feb 5, 2008 9:22 AM, McShiv <[EMAIL PROTECTED]> wrote: > > 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]