1 $. ajax ({2 URL: 'ajax/orderby. aspx ', 3 data: {appids: sortedappids}, 4 ype: 'xml', 5 type: 'post', 6 success: function (XML) 7 {8 alert ("sorted successfully! "); 9 10} 11 });
The first submission of AJAX is normal during synchronous interaction. If the second submission is not submitted at the same time as the last submitted URL address, the last return value is used. This may be a good deal for Ext, this requires special processing.
Method 1: Add parameters in get Mode
Source code:
01.var conn = Ext.lib.Ajax.getConnectionObject().conn; 02. conn.open("get", HOST+‘/OrgUserAction_checkPassword.action?id=‘+id+‘&passwordOld=‘+checkValue,false); 03. conn.send(null); 04.// alert(conn.responseText);
After modification:
01.var conn = Ext.lib.Ajax.getConnectionObject().conn; 02. conn.open("get", HOST+‘/OrgUserAction_checkPassword.action?id=‘+id+‘&passwordOld=‘+checkValue+‘&temp=‘+new Date(),false); 03. conn.send(null); 04.// alert(conn.responseText);
Added a temporary parameter temp = new date ();
This ensures that the URLs submitted each time are different, so that the results can be submitted each time.
Method 2:
Change get to post. Type: 'post ',