prototype window
I discovered this thing from a friend and it’s a cool stuff. Haven’t tried it though but really excited to give it a shot.
Overview
This javascript class allows you to add window in a HTML page.
This class is based on Prototype. The code is inspired by the powerful script.aculo.us library. You can even use all script.aculo.us effects to show and hide windows if you include effects.js file , but it’s not mandatory.
It has been tested on Safari, Camino, Firefox and IE6, Opera looks fine.
Features
- Valid HTML/XHTML generated code
- Resizable windows
- Minimize/Maximize
- Modal dialogs
- Visual effects
- Skinnable
- And more…
How to Use
It's easy to use, just include two javascripts and one css (more if you want different skins).
<script type="text/javascript" src="/javascripts/prototype.js"> </script>
<script type="text/javascript" src="/javascripts/window.js"> </script>
<link href="/stylesheets/themes/default.css" rel="stylesheet" type="text/css"/>
<!-- Add this to have a specific theme-->
<link href="themes/mac_os_x.css" rel="stylesheet" type="text/css"/>
To create a window, you just have to instanciate a Window object with some optional parameters, set innerHTML of the window main content and call show() or showCenter() function. Check out the samples tab with more sample codes
win = new Window({className: “mac_os_x”, title: “Sample”, width:200, height:150, destroyOnClose: true, recenterAuto:false});
win.getContent().update("Hello world !!”);
win.showCenter();
source: http://prototype-window.xilinus.com/index.html
Tags: javascript popup window, pop window, popup div


