Hi,
my env is TS 6.7 and NT.
I am trying to write a xml file via filesystemobject in formapi. But i am receiving "can't execute freed script" error..
here is the snippet.
var xml_doc = new ActiveXObject("Microsoft.XMLDOM");
xml_doc.async = false;
xml_doc.load("
http://192.168.3.236/iw/currencies.xml") var objNameAttr = xml_doc.createAttribute("Name");
var objDescriptionAttr = xml_doc.createAttribute("Description");
var objCodeAttr = xml_doc.createAttribute("Code");
var objOrganizationidAttr = xml_doc.createAttribute("Organizationid");
var objParentorganizationIdAttr = xml_doc.createAttribute("ParentorganizationId");
var objCurrNode = xml_doc.documentElement.firstChild;
objCurrNode.setAttribute("Name", "sa");
objCurrNode.setAttribute("Description", "sa");
objCurrNode.setAttribute("Code", "sa");
objCurrNode.setAttribute("Organizationid", "sa");
objCurrNode.setAttribute("ParentorganizationId", "NULL");
alert(xml_doc.xml);
var fso = new ActiveXObject("Scripting.FileSystemObject");
var fs = fso.OpenTextFile("
http://192.168.3.236/iw/currencies.xml", 2, true);
fs.WriteLine(xml_doc.xml);
fs.Close();
alert(xml_doc.xml) is working fine. I am getting the alert properly.
But the error is due to the next line var fso = new ActiveXObject("Scripting.FileSystemObject");
Can we use filesystemobject inside formapi.. Or am i trying something wrong.
Please throw some lights on this..
Thanks in advance!
Sathish E