Javascript/DHTML in-page popups

Over on Download.com we use a popup DHTML window library called overlibmws for dialogs and the like. I like this library because it works in a ton of browsers and degrades nicely, and because it’s easy to position the popups (give it an x/y for the window, tell it to center on the page, tell it to center on the mouse, tell it to position relative to an element on the page, etc.). (See previous posts about the library)

Here’s an upcoming alternative that introduces the same functionality but using prototype and scriptalicious style effects to make a slicker looking version of the same functionality. The core library is smaller than overlibmws by 10K, but if you want the effects you’ll have to tack on another 32K. One big advantage this script has over overlibmws is that you can easily create more than one window (overlimws really only lets you have one at a time). That said, there are a lot of things this one doesn’t do that overlibmws doesn’t, so I’ll have to wait and see where this script goes before I’m willing to switch out.
via Ajaxian:
Several sites make use of simple floating divs to make “windows” on a page, but what if you want something with a bit more refinement to it? With the help of Prototype and the script.aculou.us Javascript libraries, this post will show you how to make those popup “windows” sing.

This javascript class allows you to add window in an HTML page

This class is based on Prototype 1.4. The code is inspired of the powerful script.aculo.us library. You can even use all script.aculo.us effects to show and hide windows if you include effects.js file.

It has been tested on Safari, Camino, Firefox and IE6.

The script comes in a neat, simple download that makes it easy to use and easy to change the look of to match your site. Of course, examples are included (be sure not to miss those) and some limited documentation is included as well. He also mentions a specific use for it on his sites - to act as a debugger window for his Javascripts without messing up his layout or dealing with the hassle of alerts.



Leave a Reply

You must be logged in to post a comment.