Retrieve and send data with mootools Request

I am retrieving a data with moo using Request and works fine , but at the same time I need to send some data to the same file I am getting request from , The working code is var myRequest = new Request({ url: 'json.php', onComplete: function (response) { var jresponse = JSON.decode(response); alert(jresponse.count) } }).get(); In my json.php I have echo '{"count":5, "times":1}'; That is ok and I get alerts for count and times , But the code in json.php needs to be refined and I need to check a file id which is stored in a tag data-fileid="123" So I need to send data-fileid="123" to json.php and check condition before giving the echo '{"count":5, "times":1}'; I tried to do this at the end of my request myRequest.send('fileid=' + el.get('data-fileid')); but I don't know how to retrieve it or if it was sent to json.php at all. Please advise. Thanks.

以上就是Retrieve and send data with mootools Request的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JSON 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准