Flexible javascript dialog box for the prototype JS library.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



This creates a nice dialog-like popup using the prototype javascript lib. It was based off of Based on snippets.dzone.com/posts/show/3411

Supports custom overlays and a bunch of nifty options to mess around with. Useful when you need a basic dialog which is easy to customize and not a lot of overhead.

This is not a lightbox. It doesn't support AJAX. It simply shows a div layer with some simple effects. The dialog's HTML must appear within the HTML document.


(See examples/basic.html for working examples)

new Dialog.Box('dialog_element_id', [options = {}]);

// to show

// to hide

Available Options

use_overlay::     if you want the overlay to show or not -- setting to false means manually hiding() the dialog
hide_on_key::     if set we will listen for this key code and hide on it, set to +FALSE+ if you don't want this       
overlay_color::   sets the color of the overlay(unless using a custom one)
duration::        how long the overlay (or dialog if you use fade_dialog) takes to appear/fade
opacity_from::    appear/fade from this opacity -- you will probably never use this
opacity_to::      what opacity should the overlay get (doesn't work for dialog itself)
reset_form::      should we clear the dialog's input fields when hidden? useful for login forms
hide_select_boxes::  should we hide select boxes when transitioning? default is true for IE only
persistent::      keeps the dialog up until you explicitly tell it to hide()
fade_dialog::     should we fade in/out the dialog along with the overlay?