EasyUI Forum
May 21, 2024, 06:11:03 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Search parent of a popup dialog  (Read 5399 times)
arawak
Newbie
*
Posts: 15


View Profile
« 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 ... ...
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 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.
Logged
arawak
Newbie
*
Posts: 15


View Profile
« Reply #2 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?
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!