The Problem with Popups

I love the functionallity of stacking popups in the the Popups API 2.x alphas, but there are a couple of problems with my current approach, which keeps the entire stack in the DOM.

  • JavaScript is being executed on the entire DOM. I check, and only execute new js files, but, unlike CSS files, there is no way to unload the js after it has been added to the DOM. I haven’t run into an actual problem from this yet, but it seems inevitable.
  • Conflicting id’s. HTML loaded into the popup can contain ids that are already in the page. Simplest case is poping up one node add form form inside a node add page. This creates a non-valid DOM, and, worse, confuses Javascript that relies on unique ids for targeting. I think this can be solved by munging the id’s in the non-active parts of the DOM, and restoring the original ids as they become active.
  • Popups drive some people completely batshit crazy. Seriously, you’d think I was setting fire to puppies (ex: http://kevinhankens.com/content/adding-help-text-your-drupal-forms-using...). I used to think this was just a reaction to the abuses popups have been, and I still think that is where the over-the-top bile-filled reactions come from, but I am starting to think there is more to it than that. There definitely seems to be an distinct movement on the desktop side away from dialog boxes, especially modal dialogs, towards side panels and floating pallets. The advantage to these UI approaches is they are much gentler. They suggest a next action to the user, rather than forcing it. And todays larger, higher resolution monitors make these approaches more agreeable since we have the scene real estate to have one or more side panels without making the main work area too cramped.
So, I have been thinking about safe loading of JavaScript, namespacing and sidebars, which seems to inevitably lead me to frames. Of course frames have almost as bad a reputation as popups, but it has been a long time since I gave them a serious examination. I think it is time for another look. I will write more when I know more.

I hear ya

Glad you're getting back into it starbow. It's nice to know something I've vested a lot of my own time into is still on your radar. I really appreciate the work you've done in this area and hope to continue helping out in any way possible.

Usability / user experience

I'm apprehensive about modal popups because of the potential impact they could have on usability and user experience. I don't mean to suggest they're inherently evil, but I believe it's easy to overuse and misuse them, thus potentially giving users a negative experience.

There's a few reasons they can be bad - popups can hide useful information, they're forceful (as in 'rude'), they can encourage developers to shoehorn large forms into small popups, and so on.

There are definitely places where a popup is the only answer, such as when using an advanced WYSIWYG editor or doing small, repetitive tasks.

I wish I could find some decent usability studies on popup dialogs and best practices, but there doesn't seem to be much talk about it.

Also I don't know why you would need frames to make a sidebar, it should be something that can be achieved with normal HTML+CSS.

Modal Windows

"I wish I could find some decent usability studies on popup dialogs and best practices, but there doesn’t seem to be much talk about it."

It's not a usability study, but some great advice is at http://www.smashingmagazine.com/2009/05/27/modal-windows-in-modern-web-design/

Iframes for the win?

If I recall correctly, loading html within an IFRAME will create a new document object and circumvent the issue of non-unique element IDs. This would also allow you to handle dynamic binding of javascript to HTML elements, since the bound code could live in the iframe, and the parent document could invoke it.

This is just thinking out loud, but in theory it might just work.

-=Aaron Stewart

On user experience..

I think you may be partially correct in your assertion that popups have a bad rap.. Historically people associate popups with ads and clutter; other cases I've seen dislike popups because it's a non-intuitive action. When I click a link, I expect navigation. When I click a link with an arrow next to it I expect a slide-out or a dropdown menu. These things are simple and intuitive.

That being said, I've never seen anyone complain about the lightbox functionality on facebook, which is completely modal, but browsing through images on a photo-gallery site that uses lightbox drives me completely crazy. Perhaps it's a case-by-case basis that requires user testing to confirm?

Just one more note..

I'd love to be able to register on your blog to get notifications.. would also be nice to post without having the "Anonymous" moniker. :)

Just a thought.

-=Aaron Stewart (author of the "On User Experience" post as well)

IFrames might be the

IFrames might be the solution. I hear there are some issues with iFrames inside iFrames. And I am not sure how much rewriting I would need to do to support them. I really need to check out the Modal Frame API module.
I also need to upgrade this site to Drupal 6, and when I do I will revisit the comments settings. Of course, all of that is taking a back seat to BADCamp planning at the moment :)

OK

Non-anonymous posting and comment notify should now be working.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.