Puoi fare una cosa così:
crei un CSS di questo tipo:
codice:
input[readonly="readonly"]{
border: 0px none transparent;
padding: 0;
background-color: transparent;
}
in questo modo, un input in readonly è del tutto identico a del testo normale. Poi inserisci direttamente gli input type="text" nella tabella con readonly attivo.
codice:
<table>
<tr>
<td><input type="text" readonly="readonly" value="DATO1" /></td>
<td><input type="text" readonly="readonly" value="DATO2" /></td>
<td><input type="text" readonly="readonly" value="DATO3" /></td>
<td><input type="text" readonly="readonly" value="DATO4" /></td>
<td><a href = "#" class = "Toogler">[Edit]</a><td>
</tr>
<tr>
<td><input type="text" readonly="readonly" value="DATO1" /></td>
<td><input type="text" readonly="readonly" value="DATO2" /></td>
<td><input type="text" readonly="readonly" value="DATO3" /></td>
<td><input type="text" readonly="readonly" value="DATO4" /></td>
<td><a href = "#" class = "Toogler">[Edit]</a><td>
</tr>
<tr>
<td><input type="text" readonly="readonly" value="DATO1" /></td>
<td><input type="text" readonly="readonly" value="DATO2" /></td>
<td><input type="text" readonly="readonly" value="DATO3" /></td>
<td><input type="text" readonly="readonly" value="DATO4" /></td>
<td><a href = "#" class = "Toogler">[Edit]</a><td>
</tr>
<tr>
<td><input type="text" readonly="readonly" value="DATO1" /></td>
<td><input type="text" readonly="readonly" value="DATO2" /></td>
<td><input type="text" readonly="readonly" value="DATO3" /></td>
<td><input type="text" readonly="readonly" value="DATO4" /></td>
<td><a href = "#" class = "Toogler">[Edit]</a><td>
</tr>
</table>
poi crei una funzione, da associare all'evento onclick dei link con class = "Toogler" che, prenda tutti gli input della stessa riga della tabella e rimuova il readonly.
Poi fai il submit della form con AJAX e rimetti il readonly a tutti gli input.