I'm at a loss.  I have hooked a beforeclose function, and that works
fine.
The issue that is killing me is when I want to close the dialog after
the beforeclose returns false, nothing happens!!
On the pnlNotesConfirmation there is a "No" button.  On that "No" I
try to perform: $('#notesDialog').dialog('close');  No event action
occurs.

I tried the following line first: $('#notesDialog').dialog('option',
'beforeclose', function(ev, ui) {return true;});
Still it doesn't close.

The only way I got to work was by doing a destroy ($
('#notesDialog').dialog('destroy'); ) then re init the dialog.  That
can't be right.  What am I doing wrong.
Using 1.7.2

    $(document).ready(function() {
        $('#notesDialog').dialog({
            autoOpen: false,
            width: 590,
            resizable: false,
            draggable: false,
            bgiframe: true,
            modal: true,
            beforeclose: function(event, ui) { return CloseNotesDialog
(); }
        });
    });

    function CloseNotesDialog()
    {
        var subject = $('#<%= txtSubject.ClientID %>');
        var note = $('#<%= txtNote.ClientID %>');

        if (subject.val() != '' || note.val() != '')
        {
            var pnlNotes =  $('#<%= pnlNotes.ClientID %>');
            var pnlNotesConfirmation =  $('#<%=
pnlNotesConfirmation.ClientID %>');

            pnlNotesConfirmation.height(pnlNotes.height());
            pnlNotes.hide();
            pnlNotesConfirmation.show();

            return false;
        }
    }

--

You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=.


Reply via email to