Link to home
Start Free TrialLog in
Avatar of ST3VO
ST3VOFlag for United Kingdom of Great Britain and Northern Ireland

asked on

ctrl-w closing browser instead of popup window (GreyBox)

Hi all,

I am using GreyBox to popup windows on my website and if works fine.
There is just a problem when I use CTRL-W, which will normally close a normal popup window or tab etc... BUT in this case when I try to close the popup using CTRL-W it just closes the browser.

How can I fix this problem please?

thx

st3vo
Avatar of abel
abel
Flag of Netherlands image

The GreyBox popup windows are javascript popup windows, they are not normal popup windows. That means, that they do not block access to the underlying page (an advantage) and they are not blocked by popup-blockers (another advantage). Also, if users prefer, when they close the tab, they will close the page and the popup-window (because the popup window is actually javascript and thus part of the page) (another advantage).

So, Ctrl-W will close the browser or tab, depending on what type of browser you have. It cannot possibly close the popup window, because the browser doesn't even think it is a popup window. To the browser, the popup window is just a part of the page (and actually, it is).

> How can I fix this problem please?

you cannot, I'm sorry. Or you should choose another technique that uses normal popup windows, but then you loose all the advantages of using javascript style popup windows.
ASKER CERTIFIED SOLUTION
Avatar of abel
abel
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
My apologies to abel-san; I mean no offense. Pardon my speaking for you. If I am wrong, I willingly submit to your swift, merciful judgement.

Just for clarification: When [abel] says, "The GreyBox popup windows are javascript popup windows", he means the popup "window" is a collection of HTML elements (<div></div>, <span></span>, etc.). That is why they do not respond as true windows, because they are a different animal.

tx for clarifying that in clearer language, Badotz, no need to apologize :)

Indeed, that's what I meant. In this case, btw, the contents is a combination of some layout elements and an iframe for loading the external content..
Whew! Thanks; I *hate* awaiting judgement ;-)
Avatar of ST3VO

ASKER

Thanks all.

I agree in the advantages of using js popup, but I have a small issue which is that I need to convince the site owner (who uses ctrl-w) all the time and thinks that everyone does (well I never use it!) that js popups will be better that normal popups. I've already implemented it on he's website and he said that if I couldn't fix the issue to bin it and do it another way (which I don't really want to do), so how can I convince him that not everyone uses ctrl-w...hehehhe...or that the ctrl-w issue is not a MAJOR thing? I don't really want to redo everything :o( Also, I like js popups!
Avatar of ST3VO

ASKER

Thanks :o)
Your site owner is just like any other site owner: not knowing much about the internet, usability, and/or his clients. That's not necessarily bad, but they should trust the judgment of their system engineers and other it personnel. It is a great step that you managed to convince your site owner to get this far.

I've been in the Internet world since before its real takeof and started working with it professionally since 1993. Maybe you can call me half-blind, but it's honestly the first time I encounter someone using Ctrl-W (Ctrl-F4 ok, but not Ctrl-W, I don't know why, usually I'm quite good with all kinds of key combinations, even on Windows).

Well, here's the good news: on most browsers you can catch Ctrl-W.

And here's the bad news: you should not go down that path. You make your internet site/application less accessible to many users and they will be annoyed that you try to prevent them from closing the window.

Now, some other good news. You can tell your site owner that the reason for using js popups was to lessen the annoyances of having to click them away, even when you just want to close the browser. Now you don't have to click them away anymore if you want ot close the browser.

Changing that behavior is effectively the same as changing it back to old behavior: having a popup in the way and needing extra clicks/steps to move away. Don't do it. Keep it simple. For you, and for your users.

If your site owner doesn't budge, show him/her this post. If that still doesn't help, implement the Ctrl-W hack, but only for his IP address ;-)

-- Abel --
ah, you accepted while I was still typing the follow-up ;). Tx!
You can also throw the "increased security" bone to your site owner, since you can use JS popups EVEN WITH THE POPUP BLOCKER ON!!
Avatar of ST3VO

ASKER

Thanks, I'll talk to him in the morning and will post the outcome here :o)  GNight