2

その後、オプションモーダルをtrueに設定してjqueryダイアログを開いた後、ボタンを有効にします。ボタンは明らかにダイアログの外側にあります。これは奇妙なリクエストのようですが、ダイアログにフォームがあるため、この動作が必要です。ボタンをクリックしてデータを送信した後、フォームの最後にダイアログを追加して、[開始]をクリックする必要があります。ダイアログの外側にあるボタン上。

前もって感謝します。

4

2 に答える 2

2

Use te open event that is fired whenever the dialog is opened

$( ".selector" ).dialog({
   open: function(event, ui) { 
        $('#yourhiddenbutton').show();
    }
});

EDIT - you could do it like this

$(function() {            
    $("#dialogRifiuto").dialog({
        width: 'auto',
        autoOpen: true,
        closeOnEscape: true,
        modal: true,
        resizable: false,
        open: function(){
            //change the z-index and position the div where you want
            $('#a').css({'z-index':  1005, 'position': 'absolute', 'top': 0 });            
        },
        close: function(){
            //go back to normal
            $('#a').css({'z-index':  1, 'position': 'static' });        
        }

    })

});
于 2012-04-16T13:24:40.433 に答える
0

$('#myButton').removeAttr('disabled'); を使用してボタンを有効にできます。

于 2012-04-16T14:01:29.543 に答える