Mercurial > hg > webaudioevaluationtool
comparison core.js @ 433:f57ca6e75aec Dev_main
On XML parser error, will clear the page to show only the error message.
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Fri, 18 Dec 2015 18:33:08 +0000 |
parents | 1295512197f8 |
children | da368f23bcd3 |
comparison
equal
deleted
inserted
replaced
432:cb2132a83247 | 433:f57ca6e75aec |
---|---|
71 { | 71 { |
72 var msg = document.createElement("h3"); | 72 var msg = document.createElement("h3"); |
73 msg.textContent = "FATAL ERROR"; | 73 msg.textContent = "FATAL ERROR"; |
74 var span = document.createElement("span"); | 74 var span = document.createElement("span"); |
75 span.textContent = "The XML parser returned the following errors when decoding your XML file"; | 75 span.textContent = "The XML parser returned the following errors when decoding your XML file"; |
76 document.getElementsByTagName('body')[0].innerHTML = null; | |
76 document.getElementsByTagName('body')[0].appendChild(msg); | 77 document.getElementsByTagName('body')[0].appendChild(msg); |
77 document.getElementsByTagName('body')[0].appendChild(span); | 78 document.getElementsByTagName('body')[0].appendChild(span); |
78 document.getElementsByTagName('body')[0].appendChild(errorNode[0]); | 79 document.getElementsByTagName('body')[0].appendChild(errorNode[0]); |
79 return; | 80 return; |
80 } | 81 } |