I don't know how involved you want to get with this, but it sounds like you're looking for something like the JavaScript implementation of XML-RPC.

There is a working sample at:

[link|http://www.scottandrew.com/xml-rpc/index.html|http://www.scottandr...ml-rpc/index.html]

And there is also some other interesting stuff (with demos) at:

[link|http://www.ashleyit.com/rs/|http://www.ashleyit.com/rs/]

I haven't worked with any of this stuff, so I hope it's not too far off the path for you.