The Perfect Popup was Imperfect …

But now it’s history. The Perfect Popup is dead, long live The Perfect Pop-up.

After many years of sitting there advising about how to create accessible pop-up windows using inline event handlers (onclick), I have finally got around to updating this article using unopbtrusive JavaScript and also the accompanying Popup Window Generator (the two go very much hand in hand).

Please do take a look. If you can spot anything wrong with it, or perhaps you want to make a suggestion or two on how you can improve it, then please feel free to add something to the comments on this post.

Filed under: Accessibility, Tools
Posted by Ian on Thursday, March 22, 2007


  1. So says Devon Young

    Well done. This even works when the page is served as application/xhtml+xml!

    Added March 22, 2007 at 1:45 pm

  2. So says gérard aubrée

    Excellent script I have installed in my website. I am using the console mode to edit an image without any white margin, but I have not succeeded yet.

    Many thanks

    Added April 1, 2007 at 9:08 am

  3. So says Rachel

    Love it, thank you! Using it on my website now.

    Added April 19, 2007 at 9:45 pm

  4. So says Martin Kliehm

    Interesting. I tried a similar solution but somehow IE wouldn’t recognize my “rel” attributes. Perhaps because I used getAttribute(). I’m glad this works. The only nit I found is the spelling of “Nielsen”. ;)

    Added April 29, 2007 at 11:00 am

  5. So says Ian Chamberlain

    Many thanks Ian, a perfect solution for my least favourite web feature. If I simply have to use a pop-up, my will look like yours.

    One small typo, the last example (A popup in standard mode (icon suppressed) ) is coded as console.

    Added May 3, 2007 at 2:00 pm

  6. So says Kevin

    Could anyone advise on how to modify “The Perfect Popup” javascript so that it pops up centered in the desktop, instead of in the upper left hand corner? It would be very much appreciated :) Thanks!

    Added April 12, 2008 at 8:34 pm

Sorry, the comment form is closed at this time.