I am having a problem with a AJAX.
it’s removing all the spaces in the info that i am passing
[CODE]
script language=”javascript”>
function saveXml (myText) {
alert(myText) // This alerts shows the text as it is and how i need it to be
var url2 = ‘saveFile.asp’;
xmldoc=myText
objHTTP = new ActiveXObject(‘Microsoft.XMLHTTP’);
objHTTP.Open(‘post’,url2,false);
objHTTP.setRequestHeader(‘Content-Type’,
‘application/x-www-form-urlencoded’);
objHTTP.send(“xmldoc=”+xmldoc);
strResult=objHTTP.responseText;
alert(strResult); // shows the text with no spaces
document.write(strResult)
}
</script>
saveFile.asp
[CODE]
<%
dim MyXML
MyXML= request(“xmldoc”)
response.Write(MyXML) ‘ Shows the text noSpaces
Set fs = CreateObject(“Scripting.FileSystemObject”)
Set a = fs.CreateTextFile(“File Name.xml”)
a.WriteLine(MyXML)
a.Close
%>