
I have put together a lightweight (~4.5kb) JavaScript dialog box library. The script currently offers four dialog styles: alerts, warnings, prompts and success. There is nothing to add to your page except references to the JavaScript and CSS if you choose not to incorporate them in your existing files. The Divs are dynamically added to the DOM when the function is called. The function currently relies on a content wrapper to calculate the page height however you could use the body height but the background overlay would only cover the currently visible content. The variable for the wrapper ID as well as the speed and timer settings are available at the top of the JavaScript file. Dialog boxes are generated as follows.
showDialog('Error','You have encountered an error.','error',2);
The first property is the title of the box, the second is the message, the third is the box style (alert, warning, prompt or success) and the fourth is an optional autohide timeout. Set the auto hide to the number of seconds you want to show the dialog before it fades out. The message can take HTML, just be sure and escape when necessary. The “look and feel” can easily be changed through the CSS and additional styles can easily be added by adding 2 lines of CSS.
This script has been tested in all major browsers and is available free of charge for both personal or commercial projects under the creative commons license. Community support is available here. Paid support is also available, contact me for details.
Update 4/23/2008 – Added autohide feature, thanks for the suggestion Chris.
Update 4/23/2008 – Added dynamic vertical positioning, 1/3 way down the current viewable window.
Update 4/25/2008 – Resolved double click issue when closing.
Update 5/21/2008 – Resolved issue when clicking to close the dialog box before the fading animation completes.

Pingback: java script diolog boxs tasarımları güzel :) - Volkan Şentürk
Pingback: CSS-FAQ » Blog Archive » JavaScript dialog box library
Pingback: » JavaScript Dialog Boxes at adiso.net - Personal web site
Pingback: BlogBuzz April 26, 2008 | Webmaster-Source
Pingback: Custom JavaScript Dialog Boxes
Pingback: » Custom JavaScript Dialog Boxes Webcreatives
Pingback: Websites you shouldn’t have missed in April 2008
Pingback: 30 Nisan 2008 web’den seçme haberler » Tekil Yazı » Fatih Hayrioğlu'nun not defteri
Pingback: Discover The Best Of The Web In April 2008 - Opensource, Free and Useful Online Resources for Designers and Developers
Pingback: Discover The Best Of The Web In April 2008 - A Great Place for News, Articles & Free Web Resources
Pingback: Exceptional Ajax/javascript Techniques (Recently Created)
Pingback: Milestone 01 - 70+ High-End Components for Web Designers and Developers : DevKick Blog
Pingback: 30 recently created exceptional ajax javascript techniques
Pingback: {AJAX与Javascript}采长补短灵活应用 | 盒装大刀牌库存袈裟
Pingback: StarryNight » Blog Archive » 最新ajax特效30则
Pingback: 16+ Top JavaScript/Ajax Effects for Modern Web Design - aComment.net
Pingback: Liens pour effets Javascripts Web 2.0 | Charlie Nguyen-Duc
Pingback: Top JavaScript/Ajax Effects for Modern Web Design | Enetlive.net- Rich Internet Applications Blog
Pingback: Ücretsiz Javascript Diyalog Kutuları
Pingback: Ajax/javascript Techniques | Design it
Pingback: ücretsiz javascript diyalog kutuları « zrmbilisim katkıları ile 2009 seo yarışması
Pingback: Stylish JavaScript Dialog (Alert, Confirm, Prompt) Boxes
Pingback: 40 Useful JavaScript Libraries | Developer's Toolbox | Smashing Magazine
Pingback: 40 Useful JavaScript Libraries | Tech Underground
Pingback: 40 Useful JavaScript Libraries | The Scripts Zone
Pingback: Feed Reader (Beta) » 40 Useful JavaScript Libraries
Pingback: 40 Useful JavaScript Libraries « Hdeya team blog
Pingback: 40 Useful JavaScript Libraries | veryweblog focus on the internet ,new media.
Pingback: 40 Useful JavaScript Libraries - o2webdev
Pingback: 我想网 » Blog Archive » 40 个轻量级 JavaScript 库
Pingback: 克兰印象 » 40个轻量级JavaScript 库(下)
Pingback: 40 Useful JavaScript Libraries | Bookmarks
Pingback: 40 个轻量级 JavaScript 库(下) - Jeff-Chen.Com
Pingback: 40个实用的轻量级JavaScript库[SM] | Beleben Design
Pingback: » 【转载】40 个轻量级 JavaScript 库 (下)- WEB前端开发- 专注前端开发,关注用户体验
Pingback: Exceptional Ajax/javascript Techniques (Recently Created) | Webmaster Zone - Cyooh.com
Pingback: CAIXA DE DIÁLOGO ELEGANTE EM JAVASCRIPT
Pingback: 30个精挑细致的Ajax和Javascript 技巧 | 帕兰映像
Pingback: 40个轻量级JavaScript脚本库 | 帕兰映像
Pingback: 40+轻量级JavaScript库 | Learning jQuery
Pingback: 40 个有用的JavaScript库 - Ajax Finder [Ajax探索者]
Pingback: Custom Javascript Dialog Boxes with 4 Styles « Jbloo
Pingback: 16+ Top JavaScript/Ajax Effects for Modern Web Design | DevWebPro
Pingback: 23个Javascript弹出特效 « 幻岛|领地
Pingback: Javascript diyalog kutusu kütüphanesi - Çağdaş Polat
Pingback: Javascript diyalog kutusu kütüphanesi - - ekimdusu.net
Pingback: Milestone 01 – 70+ High-End Components for Web Designers and Developers « DesignerLinks
Pingback: 40个实用的轻量级JavaScript库 40 Useful JavaScript Libraries | Collection and sharing
Pingback: 40 Useful JavaScript Libraries « 80端口的简单幸福生活
Pingback: 40 个轻量级 JavaScript 库 (下) « i在云端
Pingback: Exceptional Ajax/javascript Techniques (Recently Created) | amitkosti.name