Mercurial > hg > webaudioevaluationtool
comparison js/core.js @ 2516:22673a6cfcfb
Update on save key
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Mon, 24 Oct 2016 11:10:42 +0100 |
parents | 913d7c132ab6 |
children | 70a319ff302e bf17cc19c1c0 |
comparison
equal
deleted
inserted
replaced
2515:913d7c132ab6 | 2516:22673a6cfcfb |
---|---|
3137 if (xml.getElementsByTagName("state").length > 0) { | 3137 if (xml.getElementsByTagName("state").length > 0) { |
3138 if (xml.getElementsByTagName("state")[0].textContent == "OK") { | 3138 if (xml.getElementsByTagName("state")[0].textContent == "OK") { |
3139 this.key = xml.getAllElementsByTagName("key")[0].textContent; | 3139 this.key = xml.getAllElementsByTagName("key")[0].textContent; |
3140 this.parent.root.setAttribute("key", this.key); | 3140 this.parent.root.setAttribute("key", this.key); |
3141 this.parent.root.setAttribute("state", "empty"); | 3141 this.parent.root.setAttribute("state", "empty"); |
3142 this.update(); | |
3142 return; | 3143 return; |
3143 } else if (xml.getElementsByTagName("state")[0].textContent == "ERROR") { | 3144 } else if (xml.getElementsByTagName("state")[0].textContent == "ERROR") { |
3144 this.key = null; | 3145 this.key = null; |
3145 console.error("Could not generate server key. Server responded with error message: \"" + xml.getElementsByTagName("message")[0].textContent + "\""); | 3146 console.error("Could not generate server key. Server responded with error message: \"" + xml.getElementsByTagName("message")[0].textContent + "\""); |
3146 return; | 3147 return; |