...well, not always :) When logged in as an "ordinary" user it works fine, but when I log in with the host account it fires after 1st click (and then it works fine).
In my module there's a radGrid with imagebuttons. The script is: jQuery(function () { Sys.Application.add_load(function () { jQuery(".confirmingGrid .DeleteButton") .each(function () { $(this).dnnConfirm({ text: "<%= DotNetNuke.UI.Utilities.ClientAPI.GetSafeJSString(LocalizeString("DeleteItem.Text")) %> '" + $("td:eq(2)", $(this).parents("tr")).text() + "'?", yesText: "<%= DotNetNuke.UI.Utilities.ClientAPI.GetSafeJSString(LocalizeString("Yes.Text")) %>", noText: "<%= DotNetNuke.UI.Utilities.ClientAPI.GetSafeJSString(LocalizeString("No.Text")) %>", title: "<%= DotNetNuke.UI.Utilities.ClientAPI.GetSafeJSString(LocalizeString("Confirm.Text")) %>", dialogClass: "dnnFormPopup", isButton: true }); }); }); });
In my codeBehind i have: JavaScript.RequestRegistration(CommonJs.DnnPlugins) DotNetNuke.Framework.jQuery.RequestDnnPluginsRegistration() ClientAPI.RegisterClientReference(Me.Page, ClientAPI.ClientNamespaceReferences.dnn)
Testing on DNN 9.2.
Any ideas?
Tycho, sadly it does not help - i'm not using DnnGrid, i'm using RadGrid itself.
As it works fine when an ordinary user logs in, my suspicion goes to the personaBar or javascript(s) loaded when host/admin user logs in.
It looks like you may be using a deprecated API endpoint to load the required DNN JS.
Update your DNN JS reference from this:
<code>DotNetNuke.Framework.jQuery.RequestDnnPluginsRegistration();</code>
To this:
<code>using DotNetNuke.Framework.JavaScriptLibraries;<br /> JavaScript.RequestRegistration(CommonJs.DnnPlugins);</code>
These Forums are for the discussion of the open source CMS DNN platform and ecosystem.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.