Hi
I want to pull master or voucher from Browser code to tally, Below is Js code to push data into tally
js code is
var strXml = "";//---assume this is master ledger xml string
strXml += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
strXml += "<ENVELOPE>";
strXml += "<HEADER>";
---
--
strXml += "</ENVELOPE>";
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://localhost:9001", true);//localhost:9001--is tally server
xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.withCredentials = true;
xhr.onload = function () {
console.log(xhr.responseText);
};
xhr.send(strXml);
But i am getting response from tally like below
<RESPONSE>Unknown Request, cannot be processed</RESPONSE>
instead of
<RESPONSE>
<CREATED>0</CREATED>
<ALTERED>1</ALTERED>
<DELETED>0</DELETED>
<LASTVCHID>0</LASTVCHID>
<LASTMID>0</LASTMID>
<COMBINED>0</COMBINED>
<IGNORED>0</IGNORED>
<ERRORS>0</ERRORS>
<CANCELLED>0</CANCELLED>
</RESPONSE>
any idea for success response ?