title: Closing Liferay dialog box programmatically
body: <p>I have Liferay dialog box, I want to close this dialog box and wish to redirect my url to a page.</p>
  
  <p>I am doing it this way.</p>
  
  <pre><code>&lt;aui:column columnWidth="16" &gt;
  
  &lt;%if(UserGroupRoleLocalServiceUtil.hasUserGroupRole(u.getUserId(), groupId, role.getRoleId())){ %&gt;
  
  &lt;input value="delete" type="button"  onclick="document.location.href='
  &lt;portlet:actionURL name="deleteUserRole"&gt;&lt;portlet:param name="memberId" value="&lt;%= memberIdStr %&gt;"/&gt;
  &lt;portlet:param name="organization" value="&lt;%=  Long.toString(organizationID) %&gt;"/&gt;&lt;/portlet:actionURL&gt;'"  /&gt;
      &lt;%} %&gt;
              &lt;/aui:column&gt;
  
  
  public void deleteUserRole(ActionRequest actionRequest,ActionResponse actionResponse){
  
  // process to delete user role
  
      Role r = RoleLocalServiceUtil.getRole(org.getCompanyId(),
                      "Power User");
  
  
      UserGroupRoleLocalServiceUtil.deleteUserGroupRoles(userID, groupId, new long[] { r.getRoleId() });
  
          actionResponse.sendRedirect("/group/employee/empHome");                 
  
  
  }
  </code></pre>
  
  <p>By using this way when I click on delete button this method gets call, perform process and it redirects to this url but withing popup window.</p>
  
  <p>I want to redirect to given page in actionResponse.sendRedirect page but not in dialog box, it should not open in dailog box.</p>
  
  <p><strong>How can I close this dialog box first and then redirect my page to given url?</strong></p>
  
  <p>I am opening dialog box by calling this class on a link 
  Below is my js file</p>
  
  <p>/<em>test.js</em>/</p>
  
  <pre><code> var myPopup;
  AUI().ready( function() {
  
      if (AUI().one('#testing-menu')) {
  
      AUI().one('.extendClick').on(
          'mouseenter',
          function(event){
              AUI().one('.navi-type').setStyles({'display': 'none'});
              AUI().one('.extendClick').setStyles({'display': 'none'});
              AUI().one('.collapseArrow').setStyles({'display': 'block'});
          }
        );
  
  
     AUI().all('.employee-dialog').on(
          'click',
          function(event){
            var url = event.currentTarget.get('href');
            event.preventDefault();
            //console.info(url);
  
          window.myPopup= Liferay.Util.openWindow(
                {
                  dialog: {
                    align: { points: ['tc', 'tc'] },
                    width: 960
                  },
                  title: 'Settings',
                  uri: url
                }
              );
          }
        );
  
  
    }
  });
  </code></pre>