$. Ajax ({
URL: 'ajax/orderby. aspx ',
Data: {appids: sortedappids },
Datatype: 'xml ',
Type: 'post ',
Success: function (XML)
{
Alert ("sorting successful! ");
}
});
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
Original code:
View plaincopy to clipboardprint?
- VaR conn = ext. Lib. Ajax. getconnectionobject (). Conn;
- Conn. Open ("get", host + '/orguseraction_checkpassword.action? Id = '+ ID +' & passwordold = '+ checkvalue, false );
- Conn. Send (null );
- // Alert (conn. responsetext );
After processing
View plaincopy to clipboardprint?
- VaR conn = ext. Lib. Ajax. getconnectionobject (). Conn;
- Conn. Open ("get", host + '/orguseraction_checkpassword.action? Id = '+ ID +' & passwordold = '+ checkvalue +' & temp = '+ new date (), false );
- Conn. Send (null );
- // 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 ',
Note that after the POST method is changed, request. Form [""] is used to receive parameters in the background.