• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Passing variable from Canvas to CGI

Participant ,
Aug 03, 2017 Aug 03, 2017

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

Views

207

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Aug 03, 2017 Aug 03, 2017

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); 

}

Votes

Translate

Translate
Participant ,
Aug 03, 2017 Aug 03, 2017

Copy link to clipboard

Copied

LATEST

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); 

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines