Hi all!
I am trying to make use of JDOMP but apparently something does not work.
Here is my code:
function saveTextToServer(){
var dateNow = new Date();
var time = dateNow.getTime();
var url = "saveNotewall.php?text=";
var noteField = document.getElementById("noteField");
url = url + noteField.value + "&time=" + time;
var scriptElm = document.createElement("script");
scriptElm.setAttribute("type", "text/javascript");
scriptElm.setAttribute("language", "JavaScript");
scriptElm.setAttribute("src", url);
var toServer = document.getElementById("toServer");
var varToServer = document.getElementById("varToServer");
var newVar = document.createElement("div");
var docFrag = document.createDocumentFragment();
docFrag.appendChild(scriptElm);
newVar.setAttribute("id", "varToServer");
newVar.appendChild("docFrag");//this row seems to be the problem
toServer.replaceChild(newVar, varToServer);
}
I have marked out the row that seems to give me a problem.
It seems as if the code stops to parse at this row, what is my problem?
Many thanks in advance!
Marcux