- execIQ = $iq({ type: "set", to: "localhost", id: connection.getUniqueId() })
- .c("command", { xmlns: Strophe.NS.ADHOC, node: $(this).attr("id"),
- action: "execute" });
- connection.sendIQ(execIQ, displayResult);
+ cmdNode = $(this).attr("id"); // Save not of executed command (in global)
+ var execIQ = $iq({ type: "set", to: "localhost", id: connection.getUniqueId() })
+ .c("command", { xmlns: Strophe.NS.ADHOC, node: cmdNode, action: "execute" });
+ connection.sendIQ(execIQ, function(result) {
+ sessionid = $(result).find("command").attr("sessionid");
+ displayResult(result);
+ });