Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to load a page with jquery ui dialog

is that possible to load another page with jquery ui dialog ?

Like Dialog + Ajax

Thanks

like image 897
Utku Dalmaz Avatar asked Oct 22 '09 16:10

Utku Dalmaz


1 Answers

I prefer to wait until I have the content to create the dialog. It seems more straightforward to me. Also, auto-sizing doesn't seem to work otherwise:

    $.ajax({
        'url': contentUrl,
        'success': function success(data, textStatus, xhr) {
            $("<div>" + data + "</div>").dialog({
                "width": "auto",
                "height": "auto",
                "close": function (e, ui) { $(this).remove(); }
            });
        }
    });
like image 191
Aryeh Leib Taurog Avatar answered Oct 17 '22 06:10

Aryeh Leib Taurog