From d935b195a2246fa24d35df7c6fc354ae628a6777 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 10 Jan 2013 15:51:33 +0100 Subject: Added attributes to nodes as well as messages for manipulating and transporting them. Switched debug interface to hugin. --- proto.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'proto.js') diff --git a/proto.js b/proto.js index 0630bbf..b382a75 100644 --- a/proto.js +++ b/proto.js @@ -208,13 +208,15 @@ try { } } else if(cmd == "update") { - var title = msg[3]; - //var task = document.getElementById(createId(observeid, id)); - var txtdiv = document.getElementById(createId(observeid, id) + "_txt"); - txtdiv.removeChild(txtdiv.firstChild); - - var txt = document.createTextNode(title); - txtdiv.appendChild(txt); + var name = msg[3]; + var value = msg[4]; + if(name == "title") { + var txtdiv = document.getElementById(createId(observeid, id) + "_txt"); + txtdiv.removeChild(txtdiv.firstChild); + + var txt = document.createTextNode(value); + txtdiv.appendChild(txt); + } } f++; } -- cgit v1.2.3