2

I need to close the browser window after the update I tried to register on the complete but not working.

<p:commandButton value="#{msg['btn-save']}"
                 actionListener="#{veiculoBean.updateModal}" 
                 oncomplete="window.close();"
                 styleClass="btn btn-primary" ajax="true">
</p:commandButton>
wittakarn
  • 3,124
  • 1
  • 18
  • 31
csf
  • 961
  • 3
  • 13
  • 28

1 Answers1

1

window.close command will only work in IE but not on Firefox and Chrome. If you see in your java script console, you will see warning on this "Scripts may close only the windows that were opened by it".

FYI:

Community
  • 1
  • 1
wittakarn
  • 3,124
  • 1
  • 18
  • 31