i am trying to send a variable to another page with a post request and i use this:
var x="hello";
var sender=new Request({
url:"page.html",
method:"post",
data:x
});
sender.send();
but how do i colected x after it gets sent to page.html? i tried reading everything i could find and work it out myself but i get strange results, so if anyone could give me a simple example i would appreciate it very much.
Here’s a jsfiddle example (using the echo service to simulate a response)
http://www.jsfiddle.net/BVgNt/1/
the idea in the request class is that it fires an onComplete (onSuccess and onError too) events when done, with
this.responsecontaining various collections of responses, check that in the firebug console to see what you can extract or consult the mootools Request.HTML manual.