Copy link to clipboard
Copied
Hi,
Can someone post an example of how to pass a variable from Animate Canvas to CGI?
Thanks in advance!
Peter
Ok, I have the solution thanks to ClayUUID. Reposting here. Hope this is helpful.
this.stop();
var params = "myVar=bananas+are+good";
var req = new XMLHttpRequest();
req.open("POST", "http://www.YourSite.com/cgi-bin/test.cgi?"+params, true);
req.addEventListener("load", transferComplete);
req.send();
function transferComplete(e) {
console.log(e.target.response);
}
Copy link to clipboard
Copied
Ok, I have the solution thanks to ClayUUID. Reposting here. Hope this is helpful.
this.stop();
var params = "myVar=bananas+are+good";
var req = new XMLHttpRequest();
req.open("POST", "http://www.YourSite.com/cgi-bin/test.cgi?"+params, true);
req.addEventListener("load", transferComplete);
req.send();
function transferComplete(e) {
console.log(e.target.response);
}