node.save

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
apramakr's picture

Hi,

I am integrating a flash module with Drupal using XMLRPC module. I am currently calling a node.save using Actionscript 2.0.
On a flash button click, I am currently calling the node.save function. But ideally, I would like the function to be called first and only after the success of node.save, forward to the confirmation url.
Right now, I am being forwarded to the page even without node.save being completed. I then have to refresh the page in order to see the results.

function send(_title:String, _body:String, _name:String, _uid:Number)
{  
var node:Object    = new Object();
node["type"]   = "submission";
node["title"]   = _title;
node["body"]    = _body;
node["name"]     = _name;
node["uid"]  = _uid;

node["body"] = "....";

c.addParam(node,XMLRPCDataTypes.STRUCT);
c.call('node.save');
getURL("http://confirmation_page");
}

Any help appreciated.
Thanks!

Comments

Any help at all? Is there a

apramakr's picture

Any help at all?

Is there a way to automatically refresh a page when node.save is called?

Well, off topic

Hugo Wetterberg's picture

I think that the reason you didn't get any answers is that it's very Flash-specific and pretty off topic for services. A possibility could be that the xmlrpc request is made asynchronously, and you're not waiting for it to finish. The xmlrpc class you're using should support callbacks or some event monitoring mechanism to detect when the call has finished. But that should be in the docs for your xmlrpc library, or Flash docs if it's core functionality.

/Hugo