Article Diary - General Knowledge Digest

TinyBox - JavaScript Lightweight Modal Window Popup Script

TinyBox is a lightweight and standalone modal window script. At only 3.4KB it doesn’t include any slideshow capabilities built-in but it can display any AJAX or HTML content (from text to videos). Future versions will include additional features. It can also be used for images and auto hiding alerts. The popups fade in/out and dynamically size based on the content if enabled. The styling is completely customizable through the simple CSS. TinyBox does not depend on any JavaScript frameworks.

JavaScript Modal Window

With the auto-hide support, the script can be used to show notifications. To display a popup box use the following code:’advanced.html’,1,300,150,1,3);

There is nothing to initialize, just start using the script. The function takes 6 parameters:
  1. The HTML content for the box or the relative path to the AJAX source
  2. A toggle (true/false or 1/0) if the content is via AJAX
  3. The width of the window (use 0 for auto)
  4. The height of the window (use 0 for auto)
  5. A toggle (true/false or 1/0) to animate the window
  6. The time in seconds to wait before auto hiding the popup (optional).
This JavaScript Modal Window 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.

For a demo of TinyBox, click here.

Requirements: No Requirements
Compatibility: All Major Browsers


Online Demo

5 (2)
Article Rating (2 Votes)
Rate this article
Attached Files
There are no attachments for this article.
There are no comments for this article. Be the first to post a comment.
Security Code Security Code
Related Articles RSS Feed
Facebook Style Chat Script - ArrowChat
Viewed 1232 times since Tue, Aug 3, 2010
What is jQuery?
Viewed 966 times since Tue, Dec 1, 2009
Which hosting plans support IIS Mod-Rewrite?
Viewed 4031 times since Sat, Oct 10, 2009
Coming Soon Template
Viewed 1180 times since Thu, Nov 12, 2009
Admin Skins - Constellation Complete Admin Skin
Viewed 1383 times since Thu, Aug 12, 2010
PHP Interview Questions with Answers - Part 1
Viewed 1323 times since Mon, Jan 11, 2010
Protovis - Visualization for JavaScript via Canvas
Viewed 1076 times since Sun, Jan 3, 2010
Create Interactive JavaScript Charts With Highcharts
Viewed 1340 times since Fri, Dec 4, 2009
5 Best Online Diagram Designing Tools
Viewed 12364 times since Sat, Jan 30, 2010
10 Most Popular JavaScript Frameworks
Viewed 1142 times since Thu, Jul 8, 2010