Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2070
StateChanged client enent not firing?
posted

I have the following defined in my WebDialogWindow:

<ClientEvents WindowStateChanged="wdwStateChanged" />

And a Javascript function as so:

function wdwStateChanged(sender, args) {

....

}

I would assume that when I set the WindowState in my code-behind to Normal, it would execute this function when my code behind is done and control goes back to the browser. However, the wdwStateChanged Javascript never seems to execute. I wanted to use this function to check to see if the WIndowState was Normal and if so, set some other items on the WebDialogWIndow (in my case, turn on/enable a timer).

How can I use this WindowStateChanged client event properly? Why isn't it firing?

/Tom

 

 

Parents
No Data
Reply
  • 24497
    Suggested Answer
    posted

    Hi Tom,

    All client side events are designed to process entries of end user, but not to raise events on internal actions of application (otherwise, it would be easy to get dead or recursive loops and other misbehaviors).

    If you use get_windowState(state) and also want to raise client state-change event, then that method (or set property by dot-net standard) can take extra boolean parameter.

    webDialog.set_windowState($IG.DialogWindowState.Normal, true);

    If that property was modified on server, then no events will be raised on client or server.

Children