Reputation: 1080
I'm in the process of converting my jquery ajax calls to use easyXDM. How might I go about doing something like this:
xhr.request({
url: "someurl",
method: "POST",
data: $("#formid").serialize(), // serializes the form's elements
}, function(rpcdata){
// do stuff
});
My issue is with serializing the form's content. It appears that easyXDM is expecting json. Is there a simple way to convert my form to json? Or is there a way to tell easyXDM to use a standard query string?
Upvotes: 1
Views: 355
Reputation: 1080
Here's one solution:
http://css-tricks.com/snippets/jquery/serialize-form-to-json/
Upvotes: 1