Interesting issue with window.close(). Cannot close window.

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Interesting issue with window.close(). Cannot close window.

Post by Jaymer »

From a link in an email, I log in a user and this screen appears:
Screen Shot 2022-08-09 at 2.12.15 PM.png
Screen Shot 2022-08-09 at 2.12.15 PM.png (20.45 KiB) Viewed 1965 times
This button is "Execute Javascript" using window.close();

I want to click the close button and close the browser window. Simple enough.
But I get this JS console message:
Scripts may close only the windows that were opened by it

And from here:
https://stackoverflow.com/questions/259 ... were-opene
its clear this is intentional.

I don't want to just "Logout" or display another URL. The user was just in Email and clicked a link, Aware shows the message and I thought its nice if it just cleanly goes away.

Thoughts?
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply