I don't remember exactly where I got it, I guess it was from an
unofficial website.

Anyway, I did some playing around and managed to get it working simply
by dynamically destroying and creating the div that the dialog is
based on each time the dialog function is called.

eg.

function spawnDialog(id) {
        $("#dialog").dialog('destroy');
        $("#dialog").remove();
        $("body").append('<div id="dialog"></div>');
    $.ajax({
      type: "GET",
      url: "index.php?method=placebid&id="+id,
      cache: false,
      success: function(html){
        $("#dialog").html(html);
        $("#dialog").show();
                $("#dialog").dialog({
                        height: 'auto',
                        width:'430px',
                        position: [top,100],
                        modal:true,
                        resizable: true,
                        overlay:{
                                "background-color": "#000",
                                "opacity": "0.75",
                                "-moz-opacity": "0.75"
                        }
                });
      }
    });
}

Thanks a lot for your help Richard, appreciate it :)

On Oct 27, 9:48 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> On Mon, Oct 27, 2008 at 8:38 AM, Naatan <[EMAIL PROTECTED]> wrote:
>
> > I assumed that pressing the "X" button or closing the dialog in any
> > other way from your browser would call the dialog close function
> > internally.. I guess I was wrong?
>
> It does indeed. But that means your next call should be .dialog("open"), not
> .dialog(options) since your dialog still exists (initialized), it's just
> closed.
>
>
>
> > Either way, having figured out that by default the dialog height is
> > fixed ot it's initial size does not really solve my problem, I could
> > write a small function to calculate the required dialog height every
> > time it is spawned and then manually set that, but to be honest I kind
> > of hoped jquery could come with something simpler than that, and from
> > the documentation I understood that this is what height: auto should
> > do in the first place.
>
> Where did you read anything about height:auto ? This is what I find on
>
> http://docs.jquery.com/UI/Dialog/dialog#options
>
> "height    Number    Default: 200
> The height of the dialog, in pixels."
>
> - Richard
--~--~---------~--~----~------------~-------~--~----~
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