A plugin that allows you to create modal windows on the fly. You can put text, forms, images, iframes or any other HTML element in it. It can be made to make a rest of the screen inactive or just be placed like a normal window.
To use include all the files
lib folder and the
modal.js, add the following to the HEAD of your page or optionally to the end of the BODY to increase efficiency and loading time -
To create a new modal window you’ll need to create an instance of the class and pass the element to the
show() method to display it in the modal window.
pop = new ModalWindow(); myElem = new Element('div').update("Hello")' pop.show(myElem, true);
The boolean value passed to the function is to show the overlay that’ll hide the rest of the window. Set it to false to make the window appear normally.
All the files related to modal-window-prototype are in the
src folder. The files that its dependent on is in the
To get started and see the basic usage see the test folder. It has examples and usage of the different options provided by modal-window-prototype.
Modal Window for Prototype, “modal-window-prototype” is licensed under the terms of the MIT license.
Copyright (c) 2009 Prateek Saxena Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (modal-window-prototype), to deal in modal-window-prototype without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of it, and to permit persons to whom it is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.