quote:
Originally posted by matty
Have a look at this: http://stackoverflow.com/questions/1192286/create...e-using-javascript
Hmm thanks for the tip but it got no use for me.
Reason :
it only tells how to make predefine absolute message
so if i were to use it
then it would only wright the word that it alreddy got and not been told
so in other words the only thing i can use from it is the function that it saves
(without msn fuction)
Maby this code tells u more if it helps you to help me xD
function xmlSaveSettings(sName,sReceive,sAnswer,sType,iFlags,sMatchCount,iStatus,bEnabled,iDelay) {
var xml = createDOM();
var xml2 = createDOM();
var xmlIndent = createDOM();
xmlIndent.loadXML(xsl);
if(checkXMLExists())
xml.load(logFile);
else {
var PreProc = xml.createProcessingInstruction("xml", "version='1.0' encoding='UTF-8'");
xml.appendChild(PreProc);
PreProc = xml.createElement("Answers");
xml.appendChild(PreProc);
PreProc - xml.createElement("Misc");
xml.appendChild(PreProc);
}
var node = xml.selectSingleNode("Answers");
var newAnswerEntry = xml.createElement("Entry");
newAnswerEntry.setAttribute("name", encodeURI(sName));
var newReceive = xml.createElement("Receive");
newReceive.text = sReceive;
newAnswerEntry.appendChild(newReceive);
var newAnswer = xml.createElement("Answer");
newAnswer.text = sAnswer;
newAnswerEntry.appendChild(newAnswer);
var newType = xml.createElement("Type");
newType.text = sType;
newAnswerEntry.appendChild(newType);
var newFlags = xml.createElement("Flags");
newFlags.text = iFlags;
newAnswerEntry.appendChild(newFlags);
var newMatchCount = xml.createElement("MatchCount");
newMatchCount.text = sMatchCount;
newAnswerEntry.appendChild(newMatchCount);
var newStatus = xml.createElement("Status");
newStatus.text = iStatus;
newAnswerEntry.appendChild(newStatus);
var newEnabled = xml.createElement("Enabled");
newEnabled.text = bEnabled;
newAnswerEntry.appendChild(newEnabled);
var newDelay = xml.createElement("Delay");
newDelay.text = iDelay;
newAnswerEntry.appendChild(newDelay);
node.appendChild(newAnswerEntry);
xml.transformNodeToObject(xmlIndent, xml2);
xml2.save(logFile);
}
(code created by the maker of Answer Machine Plus)