DotNetNuke Wiki


dnnAlert jQuery Plugin

Modified on 2011/07/15 12:46 PM by irobinson Categorized as jQuery
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

Attend A Webinar
Start  Professional Edition Trial
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

Sponsors

DotNetNuke Corporation

DotNetNuke (DNN) provides a suite of solutions that make designing, building and managing feature-rich sites and communities fast, easy and cost-effective. The DotNetNuke Platform CMS is the foundation for more than one million websites worldwide. DNN Social, our newest solution, enables businesses to create immersive, interactive communities. Thousands of organizations like True Value Hardware, Bose, Cornell University, Glacier Water, Dannon, Delphi, USAA, NASCAR, Northern Health and the City of Denver have leveraged DNN to deploy highly engaging business- critical websites. Our rapid growth in product sales and deployments resulted in DotNetNuke Corp. being named one of the fastest growing private companies in America by Inc. Magazine in 2011 and 2012.