|
Project Information
Featured
Links
|
Sometimes it's not appropriate to use the native alert and prompt functions to interact with users. This script is built to simulate (modal) dialogs using JavaScript and HTML. Features- Cross-browser. The browsers tested so far(All Windows version): IE 6.0, Firefox 3.0, Safari 3.1, Chrome 1.0.
- Capable of running multiple dialog instances simultaneously. Dialog opened later will be on top of the ones opened earlier. You have handles to all these instances and can control each of them separately.
- Simple. No dragging. No resizing. These seem to be fancy but they're generally useless and they add great complexity to the code. (However I think you can make it draggable and resizable using jQuery UI/script.aculou.us)
- Flexible. While the basic usage is showing information to user, it can be customized to load remote content by Ajax, prompt the user for input, etc. See demos below. The dom structure of the dialog is clean and after creation you have full control over all the "parts" of it. If your requirement is still not satisfied, you can replace the Dialog.prototype._makeNodes function to implement your own dom structure.
- Independent of other JavaScript frameworks. It's very simple so I tried to get rid of other JavaScript libraries.
Check out this demo: http://qingbo.org/sandbox/simple-dialog/demo/
|