jQuery UI Widgets Forums Dialogs and Notifications Window Cancel closing for the okButton

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 9 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Cancel closing for the okButton #68774

    Peter Sloth


    in the click event for the okButton (‘SubmitRenameFolder’ below) I am doing doing an ajax post to the server.
    If the value entered in the window is invalid the server will send a response code back. I would like the click event handler for the okButton to check for this code, and cancel the closing of the window in this case.
    How can I do this?

    Best regards

    showCollapseButton: false, okButton: $(‘#SubmitRenameFolder’), cancelButton: $(‘#CancelRenameFolder’), height: 105, width: 250, resizable: false, animationType: ‘fade’, theme: theme, isModal: true, autoOpen: false

    Cancel closing for the okButton #68794


    Hi Peter,

    Here is what I suggest: do not set the window’s okButton property. Instead, in your Ajax call’s success callback, call the window’s close method only if your condition is met.

    Best Regards,

    jQWidgets team

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.