If you check my Javascript code you will see that it gives answer to
all your questions.

The Dialog is simple re-opened and closed, I tried destroying but this
did not do anything.. The content div for the dialog gets it's content
through AJAX everytime the dialog function is called. The actual
dialog function is not called untill the content is added.

Since my post I've found that the height loads automatically the first
time the dialog is opened.. after that the height is fixed to the
initial dialog height every time you re-open the dialog (with
different content, as provided by ajax).

Thanks for your reply,

Nathan

On Oct 23, 6:48 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> It's not quite clear to me whether you're creating multiple dialogs,
> reloading new content into the same dialog, destroying and recreating
> dialogs on the same element, or reinitializing a new dialog on the same
> element without destroying. I guess I need to see more code. Or you could
> provide more detail. For example, translating phrases like "launch the
> dialog" "re-launch the dialog" and "opening the same dialog" into code like
>
> .dialog(options)
> .dialog("open")
> ??
>
> can go a long way. Thanks.
>
> - Richard
>
> On Wed, Oct 22, 2008 at 9:40 AM, Naatan <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I have found a bug in the jquery UI where the dialog does not
> > automatically resize to the correct height of the inner html when it
> > is launched twice on the same page, each of the times that it is
> > launched the content is appended by a function that does a GET query
> > through AJAX.
>
> > The first time I launch the dialog the content height is set
> > correctly, I can then re-launch that same dialog as many times as I
> > want, as long as the content remains the same (though it is re-loaded
> > with ajax every time) the height will stay correct.
>
> > Upon opening the same dialog with different AJAX content though, the
> > height screws up, and sticks to the height value of the second dialog
> > that I opened (oddly not the first)
>
> > This is the code I use:
> > <pre>
> > function spawnDialog(id) {
> >    $("#dialog").empty();
> >    $.ajax({
> >      type: "GET",
> >      url: "index.php?method=get&id="+id,
> >      cache: false,
> >      success: function(html){
> >        $("#dialog").append(html);
> >                $("#dialog").dialog({
> >                        height: 'auto',
> >                        width:'430px',
> >                        position: [top,100],
> >                        modal:true,
> >                        resizable: true,
> >                        overlay:{
> >                                "background-color": "#000",
> >                                "opacity": "0.75",
> >                                "-moz-opacity": "0.75"
> >                        }
> >                });
> >                document.getElementById('dialog').style.display='block';
> >      }
> >    });
> > }
> > </pre>
> > Can anyone help me out here?
--~--~---------~--~----~------------~-------~--~----~
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=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to