This article is for a specific plugin. Please be sure to read the
Introduction and Overview to jQuery Plugins which provides an introduction to the plugins.
dnnAlert
This is a simple wrapper around the jQuery UI modal that sets all of the appropriate defaults – all that needs to be done is to pass it the text to display. Use the alert in situations where you just want to tell the user a message (they read it, click ok, and the dialog closes).
Note that this plugin differs from the rest in that operates off of the global jQuery object as opposed to operating off of a jQuery object that wraps one or more selected DOM elements.
There are three textual elements that will need to be passed in to create the alert.
Available Options and their Defaults
text: '' // message to display to user
okText: 'Ok', // confirm button text
dialogClass: 'dnnFormPopup' // css class for the dialog
In addition, the plugin can accept any of the "core" jQuery UI modal options:
http://jqueryui.com/demos/dialog/. Please note that the "buttons" option will be overridden, however. As this plugin is meant to only display the one confirmation button.
Usage Example
$.dnnAlert({
okText: '<%= Localization.GetString("Ok.Text", this.LocalResourceFile)%>',
text: '<%= Localization.GetString("Message.Text", this.LocalResourceFile) %>'
});
Other jQuery Plugins
- dnnConfirm - displays an "are you sure?" confirmation in a modal dialog (uses jQuery UI)
- dnnPanels - displays content areas in regions that are expandable and collapsible
- dnnExpandAll - works with panels to expand or collapse all regions
- dnnTabs - Displays content areas in a tabbed format (uses jQuery UI)
- dnnTooltip - Provides help/info tooltip functionality
- dnnPreview - Helps preview skins and containers in a new window