Thursday, September 23, 2010

popup on popup in liferay

To implement popup on popup in liferay is quite simple. We need to have 2 pages one parent page on which 1st popup is already opened and 2nd page which will be opened in 2nd popup.

For 1st page call:
function parentPage(url) {
var popup = Liferay.Popup(
{
stack: true,
draggable:false,
title: 'Parent Page',
position:[110,50],
modal:true,
width:450,
height:365,
url:url
}
);
}
here stack:true property is important which is responsible for pop on popup.url is which page we want to load . It can be portlet url. Other parameters are self explanatory.

In child page you can simply write another popup.

function childPage(url) {
var popup = Liferay.Popup(
{

title: 'Child Page',
position:[110,50],
modal:true,
width:450,
height:365,
url:url
}
);
}

Thanks and Hope this help few people.

2 comments:

LogicGiant said...

Hello sir,
Nice post, in fact I was looking for it...
Thanks and Regards...

Harshal Patel said...

Hello sir, I am doing similar functionality in my portal but when I launch popup in my home page the other portlets are invisible and not displaying anything in page other than my popup even after closing the popup the home page remains black my other contents are not displaying so please help me....

my email id is : harshal1900@gmail.com