Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

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!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesUsing dnnConfirm on a DataGrid (Eventually)Using dnnConfirm on a DataGrid (Eventually)
Previous
 
Next
New Post
2/12/2015 6:18 AM
 

I am developing a module which involves a DataGrid and my (ultimate) objective is simply to have a confirm dialog when the user clicks "Delete" on a row using dnnConfirm.  However, I just can't get it to work. I have tried to follow the wiki instructions (although worryingly these refer to v6 of DNN - I am using 7.4.0).  I have copied the example straight, so I have in my ascx:

<script type="text/javascript">

$(document).ready(function () {

            $('#<%= btnClear.ClientID %>').dnnConfirm({

                    text: 'Delete this voucher?',

                    yesText: 'Yes',

                    noText: 'No',

                    title: 'Confirm',

                    dialogClass: "dnnFormPopup",

                    isButton: false

                });

        });

</script>

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

 

And I have tried various combinations of:

               DotNetNuke.Framework.jQuery.RequestUIRegistration();    //obsolete?

               JavaScript.RequestRegistration(CommonJs.jQueryUI);

               ClientAPI.RegisterClientReference(this.Page, ClientAPI.ClientNamespaceReferences.dnn);

In my Page_Load event.  But all I get is:

              JavaScript runtime error: Object doesn't support property or method 'dnnConfirm'

As soon as I execute my code in debug mode. (Using VS2013, dnndev.me and Christoc template) 

On the same module I have successfully implemented a JQuery UI DatePicker, so all the elements for JQuery UI would seem to be in place (Interestingly that seems to work without any of the Page_Load registration calls for JQuery UI.), I just can't work out how to initiate a dnnConfirm even on a simple, single LinkButton - what am I missing?

As a poor workaround I have put OnClientClick="return confirm('Are you sure you want to delete this voucher?');" on the Delete LinkButton, but that is not a good user interface in a DNN module and will have to try a JQuery UI Dialog, if I can't get dnnConfrim to work, but that would seem to defeat the objective.

Any help gratefully accepted.

Thanks in Advance

Nick

 

 

 

 
New Post
2/12/2015 6:22 AM
 

 

 
New Post
2/12/2015 6:30 AM
 

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
2/12/2015 6:35 AM
 

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
2/12/2015 7:36 AM
 

Hi Richard,

Thanks for coming back to me.  Just to assure you I had googled and looked at the grid post, but my problem was fundamentally getting the dnnConfirm dialog at all.  Your second link resolved it for me. Because I had actually started by wanting to use a datepicker - I had read the wiki on including JQuery UI hence I had used:

     DotNetNuke.Framework.jQuery.RequestUIRegistration();

I may have read the second Wiki at some point but had simply missed that the registration was not the same as that required for native JQuery UI (my bad):

    DotNetNuke.Framework.jQuery.RequestDnnPluginsRegistration();

Worked as soon as I put that in, although I note both are marked obsolete as of 7.2.0 - but I will work that through.

Thank you for your help. Much appreciated.

Nick

 

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesUsing dnnConfirm on a DataGrid (Eventually)Using dnnConfirm on a DataGrid (Eventually)


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out