EasyUI Forum
April 27, 2024, 04:59:36 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: pannel ajax content of Portal load data twicely  (Read 5297 times)
zzdfc
Jr. Member
**
Posts: 58


View Profile
« on: March 23, 2018, 11:45:17 PM »

pannel ajax content of Portal load data twicely when calling 'add' method,

example:

$('#pp').portal('add', {
    panel: p,
    columnIndex: 0
});
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: March 24, 2018, 05:38:30 AM »

Please look at the code below. The 'onLoad' event fires only once.
Code:
var p = $('<div/>').appendTo('body');
p.panel({
href:'_content.html',
height:100,
onLoad: function(){
console.log('onLoad')
}
})
$('#pp').portal('add',{
panel:p,
columnIndex:0
})
Logged
zzdfc
Jr. Member
**
Posts: 58


View Profile
« Reply #2 on: March 24, 2018, 06:40:28 PM »

you will find the 'onLoad' event to fire twice when you use server url for href.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: March 26, 2018, 12:13:58 AM »

Please look at this example https://jeasyui.com/demo/test/test4.html. The 'onLoad' event does fire only once.
Logged
Darrel
Jr. Member
**
Posts: 74


View Profile
« Reply #4 on: March 28, 2018, 09:20:38 AM »

Hi zzdfc,

Are you loading the easyui.js library file twice by mistake??? Because I had faced a similar issue due to this.

Regards,
Darrel
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!