WoW Insider is getting ready for BlizzCon!

DOMinclude to replace pop-ups: what do you think?

There's no question about the coolness of Chris Heilmann's DOMinclude script (hint: it's very cool). DOMinclude provides an alternative to pop-ups by generating a new "layer" inside the browser window. Now, that being said, I don't mean to sound like I'm throwing stones at someone who is a much more accomplished developer than I (here comes the obligatory "but"), but...

First of all, I have to question the veracity of this statement:
[Y]ears of unsolicited pop-up windows have conditioned users to immediately close windows when they open.
I'm not sure about that. Unwanted pop-ups, definitely. But user-initiated pop-ups, especially when it's explicitly stated that the target is going to open in a pop-up? I don't know anyone who immediately closes those. Now, I certainly don't think pop-upitis is a good thing (and neither is getting trigger happy with target="_blank"), but it is possible for pop-ups to serve a useful purpose.

Second, how will this affect pages built with the XHTML Strict doctype? DOMinclude creates its faux pop-ups  by manipulating iframes, and iframes aren't valid in Strict.

And third, when I view the DOMinclude demo (click "Phillip Pullman: The Amber Spyglass"), I get some brief flickering as the iframe is repositioned. Perhaps this issue could be resolved using Pat Fitzgerald's technique for eliminating redisplay flashes.

My M.O. for dealing with requests to "make this page open in a pop-up" is to first find out if there is no other way to accomplish the desired result; pop-ups, like Old Spice, should be used sparingly. Then, if it's determined that I absolutely must use a pop-up, my standard code to do so goes something like this:
<a href="http://somepage.com" target="_blank" onclick="window.open(this.href,'popup','scrollbars,resizable,width=300,height=400'); return false">Open pop-up</a>
Or if I'm dealing with more than just a simple, isolated pop-up, I'll make into a function a la A List Apart's Accessible Pop-up Links.

What do you think? Am I behind the times, and DOMinclude is the way to go? Or is there a time and a place for both DOMinclude and accessible pop-ups triggered by old-fashioned onclick events?

Reader Comments

(Page 1)

RESOURCES

RSS NEWSFEEDS

Powered by Blogsmith

Other Weblogs Inc. Network blogs you might be interested in: