Skip to main content
Nintex Community Menu Bar

"Close the browser window" form rule action redirects to about:blank instead of closing the window.

  • April 14, 2016
  • 1 reply
  • 39 views

Forum|alt.badge.img+10


 

Symptoms

 


"Close the browser window" form rule action redirects to about:blank instead of closing the window.
 

 

Diagnoses

 


HTML 5 standards dictate that windows that have not been opened by a script cannot be closed by that script: https://www.w3.org/TR/html51/browsers.html#dom-window-close

Here's a community post regarding this issue: http://community.k2.com/t5/K2-blackpearl/Rule-quot-close-the-browser-window-quot-with-different-results/m-p/63350#M17734
 

 

Resolution

Create a Literal, Hidden Data Label on your form, and when you wish to close the window, create a Transfer Data rule that transfers the following script into the Data Label:

<script>window.open('', '_self', ''); window.close();</script>

This script opens a blank window on the current page and then closes it, getting around the aforementioned issue.

 

 



 

1 reply

B5A7
Nintex Partner
Forum|alt.badge.img+2
  • Nintex Partner
  • June 25, 2019

This doesn't appear to work if the page is still in the workspace.