Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 405
  • Last Modified:

Javascript Window with no close button

How can I open a window from Javascript which have the close button disabled.
My requirement is to have a window that can be closed only thru an option given in the window.

1 Solution
I hope there is no such option...
ALT+F4 will hopefully remain active in Windows...
think of all the porn-popups you won't be able to close then.

If you really need a modal dialog maybe you could use an applet.

You could also set the onClose() Handler in the popup tp get notified when the window is closed.
definitely not. Cannot be done.
What you can do is to set an onbeforeunload (IE only) event that will alert the user if he closed the window from the "X" and not from the button you created.
ALT F4 stays active forever!
What about a browser with disabled Java on client side ?
Do you check existance of Java ?

The only way to open a not standardly closed window, is to simulate a Windows-like window in complete pure Java.

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

I know: Java only works if java is enabled... but isn't that true for JavaScript also?
I think the best reason to disable JavaScript completly is that some guys will always force "unclosable" popups to open...
You can disable javascript as well in your browser settings.
But to generate a new window, I think you will need Java anyway.

Devario JohnsonSoftware EngineerCommented:
I think this guy is saying that he wants to create a pop up window in using Javascript that has no close "x"...correct?

darn. I saw one!
yesterday i had a popup on my screen just like syn_siju wanted to create one. with no title-bar and just a close-button. But unfortunately, my ALT-F4-finger was too fast so it was gone and the site has a random-generator for their popups... but at least in IE 6 it seems possible

One other "solution" the enxt popup brought up was a graphic image of the titlebar (with the "x" in it) on top of the page and the popup was positioned on my screen, that the "faked" titlebar was on top and the "real" titlebar was just outside my visible area... so clicking what i thought to be x opened another page...


Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now