最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to make popup window in Liferay? - Stack Overflow

programmeradmin6浏览0评论

How to make popup window in Liferay? This my code. It's like in 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

How to make popup window in Liferay? This my code. It's like in 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

Share Improve this question edited Oct 14, 2011 at 0:07 andriy asked Oct 11, 2011 at 11:30 andriyandriy 4,1649 gold badges50 silver badges72 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 3

On top of sandeepnair85's answer, to AJAX in content form your URI, you'll have to add the following code:

<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.'
        }).render();
    }
</aui:script>

More details on how the A.Plugin.IO plugin works can be found here: http://alloy.liferay./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: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>
发布评论

评论列表(0)

  1. 暂无评论