フォームがあります。このフォーム内では、ボタンのクリックで表示されるモーダル ダイアログを使用しています。ダイアログには、同じフォームのいくつかの入力フィールドを含む div が含まれています。その内容はサーバーに送信されることはありません(メソッドPOST)ので、少しデバッグを開始しました...
- ダイアログを開かない場合、フィールドは使用可能です (サーバー側)
- ダイアログを開いてフィールドに値を入力すると、フィールドが送信されなくなりました (使用できません)。
- div を非表示 (表示: なし) にしないと (フォームが読み込まれるとフィールドが表示されます)、モーダル ダイアログを使用せずに入力すると、そこに送信されます。
-> ダイアログがフォームからフィールドを「削除」するのはなぜですか?
ご意見ありがとうございます。ウルス
HTML
<button type="button" id="opener">other, please click here</button>
<div id="dialog-modal" title="type in the new elements:" style="display: none">
<p>country:<input type="text" class="small" id="othercountry" name="othercountry" value="" </p>
<p>ccode:<input type="text" class="small" id="othercountryCode" name="othercountryCode" value=""></p></div>
Javascript
<script>
$( "#opener" ).click(function() {
$( "#dialog-modal" ).dialog({
height: 140,
modal: true
});
$( "#dialog-modal" ).bind('dialogclose', function(event)
{ do some other things, not relevant for the form }
);
});
</script>
jQuery1.8.2