Fórum
Issue with Liferay Popup window.
Soori Babu Meesala, modificado 9 Anos atrás.
Issue with Liferay Popup window.
Junior Member Postagens: 43 Data de Entrada: 10/07/14 Postagens Recentes
Hi all,
I have an issue with Liferay Pop up window. Pop up window is opening for first time. But second time if I try to open the window it is not opening . Below there is my code
Can anyone help to solve this issue?
I have an issue with Liferay Pop up window. Pop up window is opening for first time. But second time if I try to open the window it is not opening . Below there is my code
<a href="#" id="payroll_modal_title" onclick="mypop("payroll_modal")">PayPopup</a>
<a href="#" id="teach_modal_title" onclick="mypop("teach_modal")">TeachPopup</a>
<div id="payroll_modal" hidden="true">Payroll Modal Content</div>
<div id="teach_modal" hidden="true">Teach Modal Content</div>
<div class="yui3-skin-sam">
<div id="modal"></div>
</div>
<script type="text/javascript">
function mypop(myVar){
YUI().use( 'aui-modal', function(Y) {
var content_var = document.getElementById(myVar).innerHTML;
var title_var = document.getElementById(myVar+"_title").innerHTML;
var modal = new Y.Modal(
{
bodyContent: content_var,
centered: true,
headerContent: title_var,
modal: true,
render: '#modal',
width: 740,
height:340
}
).render();
}
);
}
</script>
Can anyone help to solve this issue?
Soori Babu Meesala, modificado 9 Anos atrás.
RE: Issue with Liferay Popup window.
Junior Member Postagens: 43 Data de Entrada: 10/07/14 Postagens Recentes
Hi All,
I resolved this issue by adding below two methods immediately after the render() method.
I resolved this issue by adding below two methods immediately after the render() method.
modal.hide();
modal.show();