Scripting can be our best ally or worst enemy. Depends on how you use it in your website, it can optimize the performance (or accessorize your website), or it can decrease the performance of your website. With the introduction of web2.0 along with Ajax and Ruby on Rails Framework, it should be safe to say that scripting techniques should be able to be made more efficient and harmless in any way. As you will find out, ModalBox will do just that.
ModalBox is a JavaScript technique for creating modern (Web 2.0-style) modal dialogs or even wizards (sequences of dialogs) without using conventional popups and page reloads. And yes, it may also be useful for showing bigger versions of images, or even an image slideshow. ModalBox supports transitional effects, so you can do a slide down appearing or on-the-fly resizing. Pretty cool, huh? 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 and industry-standard libraries  prototype and script.aculo.us. Since ModalBox is a browser and platform independent, it can create a 100% browser-compatible dialog box to go around popup blockers that most modern browsers use. Furthermore, you can also customize the its look and feel by using CSS to make ModalBox any way you want to.
Overall, ModalBox is a pretty handy technique to create an Ajax-based popup box. The newest version, Ver 1.4, allows you to easily create custom Ruby helpers for using ModalBox with Ruby Javascript. 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. With only about 10 KB of code, ModalBox works in most modern browsers (IE6, Firefox 1.0 & 1.5, Safari, Camino, Opera 8 and 9). A nice tool to have, indeed. So be sure to try it out yourself!
You can see the ModalBox code samples by clicking HERE!
