dinsdag, maart 22, 2005

Good and Bad Popups

So you want to use popups ? Of course you do, opening a window is a right for everybody — but you might have discovered, that there are things around called popup blockers.

Both Internet Explorer and Mozilla Firefox include tools to block popups, furthermore, software exists that blocks all popups. As a programmer, it is impossible to take these last into account.

So, what is the difference between good and bad popups.

When an html document is opened in the browser, much depends on the zone where a page is opened. If a document is opened in the zone of the local computer, there is a small difference between Internet Explorer and Firefox. Internet Explorer will consider all scripting in a page that is launched in the Local Computer Zone as a potential hazard, and will show a warning.

Popup warning
Firefox does not do this. Once the page is put on the internet, this problem does not exist (example).

A good popup, is launched by a click-event. or a doubleClick event

A bad popup is launched by an onLoad event,  onMouseOver event, onContextMenu event or onMouseOut event

This means that most “accidental” calls of popups are blocked. The only one that surprised me somewhat is the onContextMenu. But then again, right clicking a link is something we do to force
the opening of a link in a different target window, so it makes sense.

Geen opmerkingen: