2012-01-11 11 views
1

JQueryダイアログボックスを使用してテーブルを変更したり、テーブルにデータを追加しようとするプロジェクトがあります。 私はダイアログとそれを表示し、テーブルからのコンテンツをうまく動作させる関数を実装しました。また、ボタンを保存することはいいですので、データベースにコンテンツを保存します。JQuery Dialogでテキストフィールドのデータを変更することができません

私の質問は、テキストボックス内のコンテンツを編集することはできません。私はこのような入力フィールドをputed:

<input type="text" name="codice" id="codice" class="text ui-widget-content ui-corner-all" contenteditable="true" /> 

誰も私がそれらのフィールドに編集enalbeのを助けることができます。おかげさまで

<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> 

や変数を呼び出すためのJS部分:

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"); 
    } 
+0

...

position: relative; z-index: 9999; 

をスタイルになりましフォーム、すべての作業を保持しているのdivのためにあなたが私たちにダイアログで、全体のdivを表示することができます:私は入れて解決策を見つけましたか?入力内容をどのように初期化しますか? –

+0

私は全体のdivを追加しました – Akosha

+0

これはバグです。私は位置を置く解決策を見つけた:相対; z-インデックス:9999;フォームを保持するdivのスタイルに変換してください。 – Akosha

答えて

2

それはバグです。

+0

これは非常に参考になりました。奇妙な動作です。入力にはまだフォーカスがあり、キーアップイベントが発生する可能性がありますが、何らかの理由でZ-インデックスでは何もできませんでした。 – Andrew

関連する問題