onResult HTTPService
我有一个 HTTPService:
<mx:HTTPService id="scoreService" url="http://" method="POST" result="onResult(event)">
<s:request xmlns="">
<name>{..}</name>
<score>{...}</score>
</s:request>
</mx:HTTPService>
和一个(事件)脚本:
private function onResult(e:ResultEvent):void
{
if (e.result.status == true)
{
currentState='...';
}
else
{
Alert.show("...", "...");
}
}
问题是,在我将数据发布到我的 php 后,没有任何事件可能性会触发...
谢谢,Yan
I have a HTTPService:
<mx:HTTPService id="scoreService" url="http://" method="POST" result="onResult(event)">
<s:request xmlns="">
<name>{..}</name>
<score>{...}</score>
</s:request>
</mx:HTTPService>
And a script for (event):
private function onResult(e:ResultEvent):void
{
if (e.result.status == true)
{
currentState='...';
}
else
{
Alert.show("...", "...");
}
}
The problem is that none of the event possibilities fires after I POST data to my php...
Thanks, Yan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
HTTPService 中没有真正的 URL 属性——但我不知道您是否将其编辑掉。尝试将其添加到 HTTPService 标记:
您也应该始终有一个错误处理程序。
There isn't a real URL attribute in the HTTPService -- but I don't know if you edited it out or not. Try adding this to the HTTPService tag:
You should always have a fault handler too.