[英]How to make popup window in Liferay?
How to make popup window in Liferay? 如何在Liferay中制作弹出窗口? This my code.
这是我的代码。 It's like in Liferay Wiki.
就像在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'}
} );
What is missing? 什么东西少了?
PS: I'm trying to put it working in Liferay 6.0 PS:我正在尝试使其在Liferay 6.0中运行
On top of sandeepnair85's answer, to AJAX in content form your URI, you'll have to add the following code: 除了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>
More details on how the A.Plugin.IO plugin works can be found here: http://alloy.liferay.com/deploy/api/A.Plugin.IO.html 有关A.Plugin.IO插件如何工作的更多详细信息,请参见: http ://alloy.liferay.com/deploy/api/A.Plugin.IO.html
Hi can you try this code. 您好,您可以尝试使用此代码。 Its a simple example on how to create popup in liferay usin AUI
这是一个有关如何在AUI的liferay中创建弹出窗口的简单示例
<aui:script use="aui-dialog">
function showPopup(){
var dialog = new A.Dialog({
title: 'DISPLAY CONTENT',
centered: true,
modal: true,
width: 200,
height: 200,
bodyContent: "My First popup"
}).render();
}
</aui:script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.