title: Close a lightBox primefaces from iframe Button
body: <p>I use primefaces lightbox component with seam.
  I have a firstpage.xhtml page, where I have a button that display a lightbox with iframe parameter, that will display a secondpage.xhtml that have some form fields and a "Close Window" button.</p>
  
  <p>Code of firstpage.xhtml</p>
  
  <pre><code>&gt;  &lt;ui:composition xmlns="http://www.w3.org/1999/xhtml"
  &gt;   xmlns:ui="http://java.sun.com/jsf/facelets"
  &gt;   xmlns:h="http://java.sun.com/jsf/html"
  &gt;   xmlns:f="http://java.sun.com/jsf/core"
  &gt;   xmlns:p="http://primefaces.prime.com.tr/ui"
  &gt;   xmlns:opt="http://primefaces.prime.com.tr/optimus"
  &gt;   template="layout/template1.xhtml"&gt; &lt;ui:define name="head"&gt;
  &gt; &lt;p:resources/&gt; &lt;/ui:define&gt;
  &gt;               &lt;ui:define name="body"&gt;
  &gt;   
  &gt;           &lt;h1 class="title"&gt;LightBox - External URL&lt;/h1&gt;      &lt;div class="entry"&gt;
  &gt;               &lt;p&gt;LightBox can display external urls in an iframe.&lt;/p&gt;
  &gt;                   
  &gt;                   &lt;p:lightBox id="light" iframe="true" width="80%" height="80%" widgetVar="dlg"&gt;
  &gt;                   
  &gt;                         &lt;h:outputLink value="#{request.contextPath}/PermissionEdit.seam" title="PrimeFaces
  &gt; HomePage"&gt;
  &gt;                           &lt;h:outputText value="PrimeFaces HomePage"/&gt;
  &gt;                       &lt;/h:outputLink&gt;
  &gt;                   &lt;/p:lightBox&gt;
  &gt; 
  &gt;               &lt;h3&gt;Source&lt;/h3&gt; &lt;pre name="code" class="xml"&gt; &amp;lt;p:lightBox iframe="true" width="80%" height="80%"&amp;gt;     &amp;lt;h:outputLink
  &gt; value="http://primefaces.org" title="PrimeFaces HomePage"&amp;gt; 
  &gt;       &amp;lt;h:outputText value="PrimeFaces HomePage"/&amp;gt; 
  &gt;   &amp;lt;/h:outputLink&amp;gt;  &amp;lt;/p:lightBox&amp;gt; &lt;/pre&gt;
  &gt; 
  &gt; &lt;/div&gt; &lt;/ui:define&gt; &lt;/ui:composition&gt;
  </code></pre>
  
  <p>Could please someone tell me how to implement a close method  to close this lightbox iframe window when i click on the close button on the secondpage.xhtml? </p>
  
  <p>Thanks in advance</p>