私はjqueryダイアログを使用しているので、ページ上にモーダルフォームを作成しようとしています。 ただし、フォームに表示されてもダイアログのボタンは表示されません。ここでjqueryダイアログ内のボタンが表示されない
は、ダイアログを作成するJavaScriptです:
function showform() {
$("#formplan").dialog({
open: function(event, ui) {
$(".ui-dialog-titlebar-close").hide();
},
modal: true,
autoOpen: false,
dialogClass: "dialogform",
buttons: [{
text: "Planifier",
click: function() {
$("#formplan").dialog("close");
$("#formplan").submit();
}
}, {
text: "Cancel",
click: function() {
$("#formplan").dialog("close");
$("#formplan").dialog('destroy').remove();
}
}]
});
$("#formplan").dialog('open');
};
そして、ここでは、フォームは、スクリプトの呼び出しと一緒に含まれています:
<div id="formplan" class="dijitDialog" role="dialog" style="display:none">
<form style="" action="javascript:refreshTab('tabadministrationplanificateurtaches', '/profusion/scheduler/etat.html?onglet=tabadministrationplanificateurtaches&mode=integre&planed=ImportPays ' + getfromform())">
<br>planification de la tache ImportPays :
<br>
<input type="radio" name="periodicity" value="1" checked> tout les jours
<br>
<input type="radio" name="periodicity" value="2"> par jours de la semaine :
<input type="checkbox" name="Daysofweek" value="1"> dimanche
<input type="checkbox" name="Daysofweek" value="2"> lundi
<input type="checkbox" name="Daysofweek" value="3"> mardi
<input type="checkbox" name="Daysofweek" value="4"> mercredi
<input type="checkbox" name="Daysofweek" value="5"> jeudi
<input type="checkbox" name="Daysofweek" value="6"> vendredi
<input type="checkbox" name="Daysofweek" value="7"> samedi
<br>
<input type="radio" name="periodicity" value="3"> par mois :
<input type="text" name="Daysofmonth" placeholder="ex : 1:3:21">
<br>effectuer à :
<input type="text" name="hours" placeholder="ex : HH:mm:ss/HH:mm:ss">
<br> </form>
</div>
<script>
showform();
</script>
このコードは、Javaを使用してHTMLにプッシュされ、したがって、必要な場合にのみshowform()
を呼び出すスクリプトがあります。 また、modal:true
であっても、そのページをクリックするより前に気付きました。また、ページを生成するボタンをクリックすると、フォームが2回表示されます。 私は、showform()
のコールから直接来ると考えています(onclick()
イベントにリンクされていない)。
おかげで、