I am struggling to utilize the POST method in XMLHTTPRequest by invoking a Perl script with parameters. Despite confirming the validity of these variables (uName, uProject, etc.), and verifying that write.pl functions properly when parameters are manually passed via the command line,
I am encountering an issue where the parameters show up as empty when they are passed. Assistance would be greatly appreciated.
request.open("POST", "/cgi-bin/write.pl", true);
var params = uName + " " + uProject + " " + uSVAC + " " + uEVAC + " " + uLevel;
alert(params);
request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
request.send(params);