а

Ajax post async request


#1

I don’t find the right way for this request:

//Dhtmlx 

   window.dhx.ajax.post("test1.php",{ string:"text", nr:123 },function(text, xml, xhr){
    console.log(text.xmlDoc.response);


     });

//PHP
<?php

$string = $_POST['string'];
$nr = $_POST['nr'];

echo "$string $nr";

?>

Where is the problem? :thinking:


#2

Your code works well for me locally.
console log shows “text 123” successfully.
If the problem still occurs for you please, provide a complete demo or share a demo link, where the problem can be reconstructed locally.