EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: arawak on July 08, 2014, 06:05:31 AM



Title: Search parent of a popup dialog
Post by: arawak on July 08, 2014, 06:05:31 AM
Hi,

I display the popup dialog like this:
Code:
$('#popup').panel({
            href: 'url',
            onLoadError: function(){....},
});

In the code 'url', I would like to know the id of the panel container.
If I ask:
  
Code:
$('# dialog').parent();
the answer is''
  
Code:
$('# dialog').dialog ('panel');

the answer is''

How to find '#popup' ?

thank you

Excuse me for my approximate English ... ...


Title: Re: Search parent of a popup dialog
Post by: stworthy on July 08, 2014, 03:12:01 PM
To get a dialog's parent container, try this:
Code:
var d = $('#dialog');
var parent = d.dialog('dialog').parent();
By default, the dialog will be created and moved to <body>. If you want to let the dialog stay on its original position, please set 'inline' property to true.


Title: Re: Search parent of a popup dialog
Post by: arawak on July 09, 2014, 12:30:40 AM
Thank you for this answer, but if I put the property 'inline' is true, the dialog is no longer centered in the window and is no longer modal.

How to solve these problems?