I can open a Chrome browser window in kiosk mode from the command line...
start chrome --kiosk "http://example.com/"
...and then close the page with a <button>
that simply runs window.close();
in a JavaScript event.
But when I start IE in kiosk mode...
start iexplore -k "http://example.com"
...and click the same button, I get the alert:
The webpage you are viewing is trying to close the window. Do you want to close this window? [Yes /No]
Is there some way -- maybe with JavaScript or IE command line options -- to avoid the alert and get IE to act the same as Chrome?
Have your javascript function do this:
Explanation: IE won't let you close, without warning, a window you didn't open. This function opens a blank window that overwrites the current window. And since you now own it, the next part of the function closes it without issue.