0
我需要在打開一個對話框後執行一個功能。
我試着用下面的:如何在打開對話框後執行某個功能?
Liferay.Util.openWindow({
dialog: {centered: true},
id:'myID',
title: 'Title',
uri: _url
});
alert("Loading Complete");
我得到alert()
對話開幕之後,但在請求之前完成。
如何在加載對話框和請求完成後執行一個函數?
我試圖與成功,但是不起作用:
Liferay.Util.openWindow({
dialog: {centered: true},
id:'myID',
title: 'Title',
uri: _url
}).on("success", function(){
alert("Loading Complete");
});
你在那個彈出窗口中顯示了什麼?這是什麼'_url'? –
我還沒有測試過這個,但是你可以嘗試在你的對話框中聽到'visibleChange'事件:{centered:true,on:{visibleChange:function(event){if(event.newVal){alert('dialogOpened 「); }}}}'。 – stiemannkj1