Am using Liferay 6.2 and trying to get a external page in a pop up.
Am using the following code
function ShowPopup(){
AUI().ready(function(A) {
AUI().use('aui-dialog', 'aui-io', function(A) {
var url1 = '/myportlet/myview.jsp';
// var url1 = 'www.google.com';
Liferay.Util.openWindow(
{
dialog: {
cache: false,
width: 800,
height: 700,
modal: true
},
id:'myview',
uri: url1
}
);
Liferay.provide(
window,
'closePopup',
function(popupIdToClose) {
var dialog = Liferay.Util.getWindow(popupIdToClose);
dialog.destroy(); // You can try toggle/hide whatever You want
},
['aui-base','aui-dialog','aui-dialog-iframe']
);
});
});
If I provide the first var url1('/myportlet/myview.jsp'), the popup displays properly, as it is internal link, But if I provide the second var url1('www.google.com'). The localhost url is prepended for the URI(like http://localhost:8080/www.google.com
), so it is not able to display the external link in pop up.
How can i make the external url display in the popup.