Correct use of onCloseCallback for OpenModalWindow in JS / ClientScript?
Hi,
I struggling to get any JS action performed after closing a modal dialog - can someone please provide a working example, or explain the correct pattern?
I'm using v4.5, and creating most of the output in C# web + user controls
I've tried the following:
- using the onCloseCallback param in ClientTools.Scripts.OpenModalWindow to call a Javascript method - doesn't seem to fire, including using alert("test") just to see if it works
- Moving the modal logic to its own method, e.g.:
function openEditModal_<controlId>() { alert("test 1"); <ClientTools.Scripts.OpenModalWindow(...); alert("test 2"); }
(In the above, alert 1 fires, but never alert 2)
In the modal dialog, I've tried .CloseModalWindow() with + without the params. Looking at the code in UmbracoClientManager.js, am I missing something with the way it manages the UmbClientMgr? Any suggestions / examples to follow?
Correct use of onCloseCallback for OpenModalWindow in JS / ClientScript?
Hi,
I struggling to get any JS action performed after closing a modal dialog - can someone please provide a working example, or explain the correct pattern?
I'm using v4.5, and creating most of the output in C# web + user controls
I've tried the following:
- using the onCloseCallback param in ClientTools.Scripts.OpenModalWindow to call a Javascript method - doesn't seem to fire, including using alert("test") just to see if it works
- Moving the modal logic to its own method, e.g.:
function openEditModal_<controlId>()
{
alert("test 1");
<ClientTools.Scripts.OpenModalWindow(...);
alert("test 2");
}
(In the above, alert 1 fires, but never alert 2)
In the modal dialog, I've tried .CloseModalWindow() with + without the params. Looking at the code in UmbracoClientManager.js, am I missing something with the way it manages the UmbClientMgr? Any suggestions / examples to follow?
is working on a reply...