ModalBox is a JavaScript technique for creating modern (Web 2.0-style) modal dialogues or even wizards (sequences of dialogues) without using conventional popups and page reloads. And yes, it may also be useful for showing bigger versions of images. :)

ModalBox is built with pure JavaScript and is based on Sam Stephenson’s excellent Prototype JavaScript Framework and valid XHTML/CSS. ModalBox uses AJAX to load content.

ModalBox Features

  • Web 2.0-ready. ModalBox uses industry-standard libraries — prototype and script.aculo.us. Ver 1.4 allows you to easily create custom Ruby helpers for using ModalBox with RJS.
  • AJAX pages loading. ModalBox uses AJAX instead of deprecated iframe for content loading. It’s also more secure — you can’t access pages which are not on your host.
  • Browser and platform independent. Since most of modern browsers use popup blockers, it’s hard to find another way to create 100% browser-compatible modal dialogs.
  • Multi-purpose. You can create complex wizards to guide users through the process. Image slideshows can be done too.
  • NEW! Keystrokes support. Use ESC key to close ModalBox.
  • Customizable look&feel. Use CSS to make ModalBox look like you want.
  • Supports transitional effects. Slide down appearing and on-the-fly resizing.
  • Lightweight. Just about 10 KB of code.
  • Works in most modern browsers. Tested in IE6, Firefox 1.0 & 1.5, Safari, Camino, Opera 8 and 9.