Dialog is a javascript library based on the PrototypeJS framework. Communicate easily with your visitors by a typical Web2.0 dialog window.
Recommended doctype:
XHTML 1.0 Transitional
| Handle | Description | Code |
|---|---|---|
| Predefined Dialogs ^ | ||
| Alert me! | Dialogs default static alert function. |
$('dialog_alert').observe('click', function(){ |
| Confirm me! | Dialogs default static confirm function. |
$('dialog_confirm').observe('click', function(){ |
| Event handlers ^ | ||
| Dialog #1 | Default dialog with a classname attached to the content block. |
#dialog-container .myFirstDialog { color:orange; font-size:20px }<a href="javascript:;" id="dialog_1">Dialog #1</a>new Dialog({ |
| Dialog #2a, Dialog #2b | Multiple event handlers for the same dialog. |
<a href="javascript:;" class="dialog_2">Dialog #2a</a>, new Dialog({ |
| Dimensions ^ | ||
| Dialog #3 | Fixed width/height dimensions. |
new Dialog({ |
| Dialog #4 | Maximum width/height dimensions, including padding & margin offsets. |
new Dialog({ |
| Contents ^ | ||
| Dialog #5 | Single DOM object as content. |
new Dialog({ |
| Dialog #6 | Multiple DOM objects and/or HTML strings as content. |
new Dialog({ |
| Dialog #7 | Extended content. |
new Dialog({ |
| Dialog #8 | Use dialog in steps or as gallery. (Bonus: Use your left/right keyboard arrows to navigate.) |
new Dialog({ |
| Targets ^ | ||
| Dialog #9 Im a div element with ID #dialog_9_target |
Fetch source content for dialog. (Auto open this dialog, click here, and hit F5.) |
<div id="dialog_9_target">Im a div element with ID #dialog_9_target</div>new Dialog({ |
| AJAX ^ | ||
| Dialog #10 | Simple PHP file loaded by AJAX (ajax.text.php). |
new Dialog({ |
| Dialog #11 | JSON string generated by PHP loaded with AJAX and parsed into a template (ajax.json.php, be patient; PHP lets it sleep for a few seconds). |
new Dialog({ |
| Iframe ^ | ||
| Dialog #12 | Google.com loaded in an iframe as content for Dialog. |
new Dialog({ |
| Closing ^ | ||
| Dialog #13 | Disable close link and closing by clicking the overlay. |
new Dialog({ |
| Dialog #14 | Close by using Dialogs static function. (Note: because no title is given and closing link is disabled the top-header is completely hidden.) |
new Dialog({ |
| Callbacks ^ | ||
| Dialog #15 | All available callback functions. |
new Dialog({ |
| Misc. ^ | ||
| Dialog #16 | Disable inner scrolling. |
new Dialog({ |
| Dialog #17 | Change the basic colors and overlay opacity. |
new Dialog({ |
| Dialog #18 Activate |
Dialogs open/close class methods for more complex code. (Note: don't assign the handle option.) |
<input type="checkbox" id="dialog_18_activate" /> Activatevar modal = new Dialog({ |