Forum Moderators: open
Is it possible to have a popup, preferably a DHTML popup, so popup blockers don't block it
Re: popup window.
Thankfully, no (afaik). At least, not automatically.
However, most popup blockers don't prevent popups that have been triggered by a user event (eg. onclick).
By the term 'dhtml popup' do you mean a z-indexed <div> that appears on top of the other content within the page?
If so, then popup blockers have no effect on those and you can create them as you wish.
If people are implementing a popup blocker, try to respect that and resist using ways to undermine their clear preferences. If they are using popup blockers then they are unlikely to be impressed if/when you manage to force a popup window on them. At the very least, it's unlikely to put them in the right mood for buying your goods or services.
All that aside, there is a way you can include a fall-back instruction for use if a popup window is blocked.
Here is a basic example:
function doPopup() {
var popWin = window.open('membermessage.html','memMess','height=200,width=200');
if (!popWin) {
dosomethingelse();
}
} This mechanism could be used to offer either a message or some other alternative to those using blockers.
It could probably also be used in conjunction with cookie data, but that's not my field so I can't help you on that score.
Of course, none of this will work on the <=15% of those who are browsing without javascript enabled (general statistic), so it's advisable to make sure that the popup content is not critical site content.
Hope that helps.