Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

dnnConfirm jQuery Plugin

Return to previous page

  • 4/7/2015
  • 11997 Views

Comments

11997 Views

dnnConfirm jQuery Plugin

Last updated long time ago

Comments

Common

(Enter the content of this article below)

Advanced

 
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.

dnnConfirm

Another wrapper for the jQuery UI dialog plug-in. Use dnnConfirm to make sure the user wants to perform an action – they’ll have the chance to confirm their intent or cancel the action.

The plugin is intended to be used on either links or buttons. This can be set by the isButton parameter , which has a default value of "false" to support links, which are the most expected use-case. If you want to use a button (such as an imagebutton), please change the isButton value to true, in which case the action will be performed on confirmation.

Available Options and their Defaults

text: 'Are you sure?', // message to display to user
yesText: 'Yes', // "confirm" button text
noText: 'No', // "deny" button text
title: 'Confirm', // title text
dialogClass: 'dnnFormPopup', // class used for dialog
isButton: false // if false will follow href, if true will perform button action

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 "confirm" or "deny" buttons.

Usage Example

HTML:

<asp:LinkButton CssClass="dnnSecondaryAction dnnLogDelete" ID="btnClear" resourcekey="btnClear" runat="server" />

JS:

$('#<%= btnClear.ClientID %>').dnnConfirm({
text: '<%= LocalizeString("ClearLog.Text") %>',
yesText: '<%= Localization.GetString("Yes.Text", Localization.SharedResourceFile) %>',
noText: '<%= Localization.GetString("No.Text", Localization.SharedResourceFile) %>',
title: '<%= Localization.GetString("Confirm.Text", Localization.SharedResourceFile) %>'
});


Other jQuery Plugins

  • dnnAlert - displays a notice 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
Contents
No sections defined
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out