var lv = new LoadVars();
var r = new LoadVars();
lv.action = "update";
r.onLoad = function(success)
{
//do further logic here
}
lv.sendAndLoad("http://example.net/service.php", r, "POST");
How to do the above in flex 3?
UPDATE
How to do it with URLLoader
??
WITH HTTPService
var vo:Object = new Object;
vo.action = "update";
s = new HTTPService();
s.url = "http://example.net/service.php"
s.method = "POST";
s.resultFormat = "e4x"; //or xml or whatever
s.send(vo);
s.addEventListener(ResultEvent.RESULT,onLoad);
WITH URLLoader
var loader:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest("url here");
var vars:URLVariables = new URLVariables();
vars.action = "update";
request.data = vars;
request.method = URLRequestMethod.POST;
loader.load(request);
loader.addEventListener(Event.COMPLETE,onComplete);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.