Copy link to clipboard
Copied
adobe animate build to files one html and one js.
how can i pass vaiiable from js to html or php?
Copy link to clipboard
Copied
var xmlhttp;
var domParser = new DOMParser();
//Parse the XML string into an XMLDocument object using
//the DOMParser.parseFromString() method.
//var xmlDocument = domParser.parseFromString(xmlString, "text/xml");
if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
} else { // code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
console.log("TEST15");
var xml_string = xmlhttp.responseText;
}
}
xmlhttp.open("GET", "abc.php?receive_1="+var_1toPost+"&receive_2="+var_2toPost+"&receive_3="+var_3toPost,true);
// in php:
/*
<?php
$received_1 = $_GET['receive_1'];
$received_2 = $_GET['receive_2'];
$received_3 = $_GET['receive_3'];
*/
xmlhttp.send();