Hi.
Now I have tried with
MsgPlus.ScripFilesPath + "\\indstillinger.xml" but I can't get it work.
Heres my code:
code:
function OnWndMainEvent_CtrlClicked(Wnd, Handling)
{
switch(Handling)
{
case "knap_tilfoej":
var Sti = MsgPlus.ScriptFilesPath + "\\indstillinger.xml";
var Navn = Wnd.GetControlText("input_navn");
var Modtaget = Wnd.GetControlText("input_modtaget");
var Svar = Wnd.GetControlText("input_svar");
var xml = new ActiveXObject("Microsoft.XMLDOM");
xml.load(Sti);
var toAdd = xml.createElement("Navn");
toAdd.appendChild(xml.createTextNode(Navn));
xml.getElementsByTagName("Navn")[0].appendChild(toAdd);
xml.save(Sti);
Wnd.Close(1);
break;
case "knap_luk":
Wnd.Close(1);
break;
}
}
And here is my XML-document (indstillinger.xml)
code:
<?xml version="1.0" encoding="UTF-8"?>
<Indstillinger>
</Indstillinger>