To implement adding comments, multiple values ​​must be sent to an AJAX request params. How to implement it in pure javascript. In the code section below, only one value is sent, the comment text.

var comment = document.getElementById("textCommentID").value; params = "comment=" + comment; request = new ajaxRequest() 

  • one
    Create an object and send it - Dmytryk
  • and what prevents you from adding new parameters: params = "comment =" + comment + '& fild =' + data + '& fild2 =' + data2; - Arsen

0