灯箱iframe关闭

时间:2013-02-11 14:06:11

标签: javascript jsf iframe primefaces

我在Lightbox iframe中有一个按钮。如何通过点击该按钮关闭该iframe?

我的代码如下所示:

<p:lightBox id="posetastavkeListaLightBox" 
            widgetVar="posetastavkeListaLightBoxWidget" 
            iframe="true" width="900px" height="700px">          
</p:lightBox>

1 个答案:

答案 0 :(得分:1)

通过this answerClose a lightBox primefaces from iframe Button

<p:lightBox id="light" iframe="true" width="80%" height="80%" widgetVar="dlg">

iframe方:

<p:commandButton value="Close" onsuccess="parent.dlg.hide();" ajax="true" process="@none" />