title: How to close PopUp window in Liferay 6.2?
body: <p>I am using Liferay UI for popup window in <strong>Liferay 6.2.</strong> I am getting the pop up but i can not close it.Why it is not working <strong>Liferay 6.2.</strong></p>
  
  <p>Below is my code which is written on parent page:</p>
  
  <pre class="lang-js prettyprint-override"><code>AUI().ready(function(A) {
      AUI().use('aui-dialog', 'aui-io', function(A) {
          var url = '&lt;%=testPopupURL.toString()%&gt;';
          Liferay.Util.openWindow(
                  {
                      dialog: {
                          cache: false,
                          width:800,
                          modal: true
                      },
                      id:'&lt;portlet:namespace/&gt;shahbaj',              
                      uri: url
                  }
              );
  
      Liferay.provide(
          window,
          '&lt;portlet:namespace /&gt;closePopup',
          function(popupIdToClose) {
              var A = AUI();
              alert(popupIdToClose);
              A.DialogManager.closeByChild('#' + popupIdToClose);
          },
          ['aui-base','aui-dialog','aui-dialog-iframe']
          );
      });
  });
  </code></pre>
  
  <p>Below code is pop-up page content:</p>
  
  <pre><code>&lt;aui:button name="YES" value="YES" onClick="javascript:yes();"/&gt;
  &lt;aui:script&gt;
      function yes(){
          alert('pop');
          Liferay.Util.getOpener().&lt;portlet:namespace /&gt;closePopup('&lt;portlet:namespace /&gt;shahbaj');
      }
  &lt;/aui:script&gt;
  </code></pre>
  
  <p>Please help me out!!</p>