Can XMLHttpRequest object be created with JavaScript in PDF document
I m planning to add five smilies from sad to happy to the bottom of our invoices to measure user satisfaction. User can choose to submit the chosen one with a button. I want to send this data -which is a number from 1 to 5- to a web server to process.
var xhttp = new XMLHttpRequest();
xhttp.open("POST", "https://mywebservice.asp", true);
xhttp.setRequestHeader("Content-type", "application/json");
xhttp.send(newdata);
Newdata is the number from 1 to 5 mentioned above.
Right now I m opening .pdf files in Firefox browser and getting below error.
ReferenceError: XMLHttpRequest is not defined
send@resource://pdf.js/build/pdf.scripting.js line 70 > eval:4:13
@10474819://pdf.js/build/pdf.scripting.js line 70 > eval:9:1
globalEval@resource://pdf.js/build/pdf.scripting.js:70:41
_runActions@resource://pdf.js/build/pdf.scripting.js:3100:14
_dispatchDocEvent@resource://pdf.js/build/pdf.scripting.js:3067:16
dispatch@resource://pdf.js/build/pdf.scripting.js:2613:28
_dispatchEvent@resource://pdf.js/build/pdf.scripting.js:2025:27
__webpack_modules__</initSandbox/<@resource://pdf.js/build/pdf.scripting.js:254:22
