Ho esemplificato la tabella ma il sunto è sempre il solito:
vorrei data la seguente tabella:
Che cliccando sul rigo, alternativamente mi inserisse SI oppure NO nel campo ma evidentemente sbaglio qualcosa. Con queste istruzioni riesco solo a dare il primo valore 'SI' al campo.<form name='layoutform' method='post' action=''><table width='400' border='1'>
<tr onclick="
if (document.layoutform.id_sel1.value=='SI') { document.layoutform.id_sel1.value='NO'; }
if (document.layoutform.id_sel1.value=='NO') { document.layoutform.id_sel1.value='SI'; }
">
<td id='id_td_sel1' width='100'><input id='id_sel1' name='sel1' value='NO' type='text' style='width:50px;' /></td>
<td id='id_td_a1' width='100'>a1</td>
<td id='id_td_b1' width='100'>b1</td>
</tr>
</table>
</form>![]()

Rispondi quotando