Fórum

login portlet popup opens 3 times liferay6.2 EE

Ankita Jain, modificado 9 Anos atrás.

login portlet popup opens 3 times liferay6.2 EE

Junior Member Postagens: 49 Data de Entrada: 05/02/14 Postagens Recentes
Hi

I have created a hook of login portlet as I want to open login portlet as a popup. But popup opens 3 times as page is loading 3 times.

I have added below code in my jsp

<portlet:renderURL var="popupURL" windowState="<%=LiferayWindowState.POP_UP.toString()%>">
<portlet:param name="jspPage" value="/html/portlet/login/login.jsp"/>
</portlet:renderURL>


Added my js below password check's js, Here I want popup to be open at the time of load.(which I don't know how to proceed with it). For trying the popup I am calling my function from script only.

<aui:script use="aui-base">
var password = A.one('#<portlet:namespace />password');

if (password) {
password.on(
'keypress',
function(event) {
Liferay.Util.showCapsLock(event, '<portlet:namespace />passwordCapsLockSpan');
}
);
}
</aui:script>
<script type="text/javascript" charset="utf-8">
popupload();
function popupload()
{
AUI().use('aui-base',
'aui-io-plugin-deprecated',
'liferay-util-window',
'aui-dialog-iframe-deprecated',
function(A) {

var popUpWindow=Liferay.Util.Window.getWindow(
{
dialog: {
centered: true,
constrain2view: true,

modal: true,
resizable: false,
width: 700
}
}
).plug(
A.Plugin.DialogIframe,
{
autoLoad: true,
iframeCssClass: 'dialog-iframe',
uri:'<%=popupURL.toString()%>'
}).render();
popUpWindow.show();

popUpWindow.io.start();

});

}

</script>


thanks