Can I change the dimensions of a dialog box in the open: event?

I already created a dialog box like this:

    this.dialog({
                autoOpen: false,
                modal: true,
                resizable: true,
                draggable: true,
                height: 'auto',
                width: 875,
                buttons: {
                   ....<code here>
                },
                open: function (event, ui) {
                    if ($(this).data('action') != "Editing HTML") {

is there some way that I could change the height and width inside the "open" to be:

        width: $(window).width() - 20,
        height: $(window).height() - 20,

If the above condition that checks "action" is met?
Can I change the dimensions of a dialog box in the open: event?
===


I already created a dialog box like this:

    this.dialog({
                autoOpen: false,
                modal: true,
                resizable: true,
                draggable: true,
                height: 'auto',
                width: 875,
                buttons: {
                   ....<code here>
                },
                open: function (event, ui) {
                    if ($(this).data('action') != "Editing HTML") {

is there some way that I could change the height and width inside the "open" to be:

        width: $(window).width() - 20,
        height: $(window).height() - 20,

If the above condition that checks "action" is met?