Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
elizabeth__
Contributor III
Contributor III

Close Browser Tab in Qlik Sense Enterprise

Hello all,

I need to add a button to my app that will close the browser window. It would be best for it to work in all browsers, but Chrome is our recommended browser for Qlik Sense.

The reason I need this is because the user flow for the app is as follows: 

  1. User clicks a button on a desktop application
  2. Application launches Chrome to a specific worksheet in the Qlik Sense app
  3. User interacts with the app
  4. User needs to close Chrome. However, Chrome is in Kiosk Mode so there needs to be a button to do this
  5. User returns to the desktop application

I tried searching for an answer and couldn't turn up anything; and I am new to custom work in Qlik Sense. If I was working on a regular webpage I would just add window.close() to the onclick event of a button, but I am not sure how to accomplish this with Qlik.

Thanks

1 Solution

Accepted Solutions
elizabeth__
Contributor III
Contributor III
Author

It's not perfect, but I came up with something that will work in my particular use case. I created a really simple extension that lets me drag-and-drop a button which has a JavaScript function for closing the window and also the href of /exitkiosk to let it work in Chrome.

Because modern browsers want to limit what JavaScript is allowed to do for security, there are some extra steps that need to be taken with some browsers. 

  • If using Chrome, Exit Kiosk extension has to be installed
  • If using Firefox, allow_scripts_to_close_windows must be set to true in settings
  • If using IE11 or Edge, it works with no modification

I don't think it would be too hard to polish the CSS & add some properties to this that could be edited in Qlik, like button color and so on, but this is what we are using right now.

View solution in original post

4 Replies
Chris_Rice
Support
Support

Hey Elizabeth,

There's no native way to do this currently, and I'm not seeing anything on developer.qlik.com which would accomplish the same task. It may be possible to write an extension to do this, especially since you know the HTML code already. 

Thanks!

 

elizabeth__
Contributor III
Contributor III
Author

Thanks for the response, Chris. I thought that may end up being the case.

I have a solution for closing a tab with the "big 3" browsers using HTML/CSS and JavaScript, so perhaps I can integrate it with some custom work.

Chris_Rice
Support
Support

If you wind up doing that, can you post the like here and then mark your link as the solution?

 

Thanks!

elizabeth__
Contributor III
Contributor III
Author

It's not perfect, but I came up with something that will work in my particular use case. I created a really simple extension that lets me drag-and-drop a button which has a JavaScript function for closing the window and also the href of /exitkiosk to let it work in Chrome.

Because modern browsers want to limit what JavaScript is allowed to do for security, there are some extra steps that need to be taken with some browsers. 

  • If using Chrome, Exit Kiosk extension has to be installed
  • If using Firefox, allow_scripts_to_close_windows must be set to true in settings
  • If using IE11 or Edge, it works with no modification

I don't think it would be too hard to polish the CSS & add some properties to this that could be edited in Qlik, like button color and so on, but this is what we are using right now.

View solution in original post