EasyUI Forum
May 21, 2024, 07:02:05 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: Select the way ajax loads data  (Read 9233 times)
WeberJ65
Newbie
*
Posts: 6


View Profile Email
« on: March 20, 2012, 11:47:38 PM »

Hallo,

i have seen in the Quellcode that some plugin allocate the way ajax loads data (synchronously or asynchronously). For the combotree plugin (depending on combobox) i can select the method-flag but not the async-flag. (Seen screenshot). At my application i must block the brower while the request ist active. How can i set this parameter for the combobox-plugin?

many thanks
Joachim
Logged
WeberJ65
Newbie
*
Posts: 6


View Profile Email
« Reply #1 on: March 22, 2012, 01:09:48 AM »

Hallo together,

i found a solution to send the absend paramter "async".(Code above)
A second problem i found is to transmit some Data to the server with post-method. The option parameter "data" do not work correctly. It's always set to an empty object
Code:
9449 _6dd=_6dd||{};
The Variable _6dd has never become a value. I modify the code like this:
Code:
function _6db(_6dc,url,_6dd,_6de){
//New Code insert by j.w. 2012.03.22
var _6xx = null;
//End new Code insert by j.w. 2012.03.022
var opts=$.data(_6dc,"combobox").options;
if(url){
opts.url=url;
}
if(!opts.url){
return;
}
//Old original Code
//_6dd=_6dd||{};
//$.ajax({type:opts.method,url:opts.url,dataType:"json",data:_6dd,success:function(data){
//END old original Code

//New Code insert by j.w. 2012.03.22
_6xx=opts.async?true:false;
_6dd=opts.data||{};
$.ajax({type:opts.method,async:_6xx,url:opts.url,dataType:"json",data:_6dd,success:function(data){
//End new Code insert by j.w. 2012.03.022

_6d6(_6dc,data,_6de);
},error:function(){
opts.onLoadError.apply(this,arguments);
}});
};

Developer i hope it's o.K. and you can clear this bug in any of the next version.

Many regards
Joachim
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!