如何在Liferay中制作弹出窗口? 这是我的代码。就像 Liferay Wiki 中的一样。
var popup = new Liferay.Popup( {
header: 'our title',
position:[150,150],
modal:true, width:500,
height:300,
xy: ['center', 100],
url: '/my_file.jsp',
urlData: { winowState : 'LiferayWindowState.EXCLUSIVE'}
} );
缺少什么?
PS:我正在尝试让它在 Liferay 6.0 中工作
最佳答案
除了 sandeepnair85 的答案之外,要在 URI 内容中使用 AJAX,您还必须添加以下代码:
<aui:script use="aui-dialog">
function showPopup(){
var dialog = new A.Dialog({
title: 'DISPLAY CONTENT',
centered: true,
modal: true,
width: 200,
height: 200
}).plug(A.Plugin.IO, {
uri: 'http://myurl.com'
}).render();
}
</aui:script>
有关 A.Plugin.IO 插件如何工作的更多详细信息,请参见此处: http://alloy.liferay.com/deploy/api/A.Plugin.IO.html
关于javascript - 如何在Liferay中制作弹出窗口?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7725343/