Is there a way to disable the 'X" close button of the browser ?

Is there a way to open a pop up window that does NOT have the X to close it ?
I want to force the user to close it with our custom button so that when they do the parent page is refreshed.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jason C. LevineDon't talk to me.Commented:
There's no guaranteed way to do it because this kind of javascript call was massively abused during the early years of the web and the browsers don't typically allow it anymore.  And the first time a site tries to do this to me is the last time I visit this site (assuming this is a public page)

You'd be better off opening a modal div/iframe and have your refresh action fire from that.  Similar effect, more control, less chance of running into sandbox/security issues.
AleksAuthor Commented:
That's ok. I don't mind if the user closes the window using the browser "X".
BUT when they do I need to refresh the parent page. How can I do this ?
Jason C. LevineDon't talk to me.Commented:
It would look something like this:

    window.onunload = refreshParent;
    function refreshParent() {

Open in new window

Price Your IT Services for Profit

Managed service contracts are great - when they're making you money. Yes, you’re getting paid monthly, but is it actually profitable? Learn to calculate your hourly overhead burden so you can master your IT services pricing strategy.

AleksAuthor Commented:
Where should I place that code ?  in the pop up window ?
Jason C. LevineDon't talk to me.Commented:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AleksAuthor Commented:
I can't modify that window unfortunately. We are going to try a different approach, thanks to all.
AleksAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.