Skip navigation.

Claws, fangs, fur...

...the bear essentials

Cross-browser pop-unders

, , ,

It's been done before, I know. But I like reinventing the wheel. Especially when it comes to techniques I want to copyright.

Here's the link: [url]http://www.omegajunior.net/code/popunder.html

This is what it does:
  • Creates a window that looks like an MS Windows window, acting like a modal dialog
  • Displays an arbitrary file or uri inside that window
  • Hides the rest of the page behind a see-through layer to avoid click-throughs
  • Makes specific other hyperlinks on the page open in the same modal dialog


It uses unobtrusive javascript. No AJAX. The window and all its elements are created in javascript entirely. Thus all that is needed is one single script reference. (The example page has the javascript embedded for easy reference.)

It's tested in all major browsers on the MS Windows platform and boy did they need a lot of tweaking. I got around most problems without hacks... all is outlined in the example page (it's too much to repeat, really).

Suggestions and test results welcome.

Criminals, everywhereAdding javascript to a real xhtml page, unobtrusively

Comments

Aneeqa 4. September 2007, 17:28

Excelente

OmegaJunior 25. September 2007, 19:56

Script updated to let MSIE 7 receive a view looking as good as the one for Opera, Firefox and Safari. MSIE 6 is still the odd one out (which shouldn't come as a surprise to anyone).

Write a comment

You must be logged in to write a comment. If you're not a registered member, please sign up.

Download Opera, the fastest and most secure browser