Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • overflew 87 posts 110 karma points
    Aug 02, 2010 @ 01:16
    overflew
    0

    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?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies