I have project that shows few tables and try to use JQuery dialog boxes to change and add data to tables.
I implemented dialog and the function to show it and populate with content from table works fine. Also save button works nice so I save content to database.
My question is when I open dialog my content inside text boxes is not editable. I puted input fields like this:
<input type="text" name="codice" id="codice" class="text ui-widget-content ui-corner-all" contenteditable="true" />
Can anyone help me to enalbe editing to those fields.
Thanks.
<div id="dialog-form" title="Gestione Tipo Appuntamento" >
<form id="dialogform" action="agendaTipoAppuntamentoSalvaJson.do" contenteditable="true" >
<input type="hidden" name="idTipoAppuntamento" id="idTipoAppuntamento" value="" />
<fieldset><table>
<tr>
<td>
<label for="codice">Codice </label>
</td><td>
<input type="text" name="codice" id="codice" class="text ui-widget-content ui-corner-all" contenteditable="true" />
</td></tr><tr>
<td>
<label for="descrizione">Descrizione </label>
</td><td>
<input type="text" name="descrizione" id="descrizione" value="" class="text ui-widget-content ui-corner-all" contenteditable="true" />
</td></tr><tr>
<td>
<label for="descrBreve">descrBreve </label>
</td><td>
<input type="text" name="descrBreve" id="descrBreve" value="" class="text ui-widget-content ui-corner-all" contenteditable="true" />
</td></tr><tr>
<td>
<label for="colore">colore </label>
</td><td>
<input type="text" name="colore" id="colore" value="" class="text ui-widget-content ui-corner-all" contenteditable="true" />
</td>
</tr>
</table></fieldset>
</form>
</div>
and JS part to call variables:
function showUpdate(id,codice,descrizione,descrBreve,colore) {
$('#idTipoAppuntamento').val(id);
$('#codice').val(codice);
$('#descrizione').val(descrizione);
$('#descrBreve').val(descrBreve);
$('#colore').val(colore);
$( "#dialog-form" ).dialog( "open" );
}
It’s a bug. I found solution to put:
into style for div that holds form and everything work now…