Mercurial > hg > webaudioevaluationtool
comparison core.js @ 1202:27be75c51b5c
Bug #1607, #1608 and #1610 fixes.
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Mon, 22 Feb 2016 14:38:45 +0000 |
parents | 4560587673b4 |
children | 1f352095179e |
comparison
equal
deleted
inserted
replaced
1201:5e2e3becc292 | 1202:27be75c51b5c |
---|---|
145 var r = new XMLHttpRequest(); | 145 var r = new XMLHttpRequest(); |
146 r.open('GET',url,true); | 146 r.open('GET',url,true); |
147 r.onload = function() { | 147 r.onload = function() { |
148 loadProjectSpecCallback(r.response); | 148 loadProjectSpecCallback(r.response); |
149 }; | 149 }; |
150 r.onerror = function() { | |
151 document.getElementsByTagName('body')[0].innerHTML = null; | |
152 var msg = document.createElement("h3"); | |
153 msg.textContent = "FATAL ERROR"; | |
154 var span = document.createElement("p"); | |
155 span.textContent = "There was an error when loading your XML file. Please check your path in the URL. After the path to this page, there should be '?url=path/to/your/file.xml'. Check the spelling of your filename as well. If you are still having issues, check the log of the python server or your webserver distribution for 404 codes for your file."; | |
156 document.getElementsByTagName('body')[0].appendChild(msg); | |
157 document.getElementsByTagName('body')[0].appendChild(span); | |
158 } | |
150 r.send(); | 159 r.send(); |
151 }; | 160 }; |
152 xmlhttp.send(); | 161 xmlhttp.send(); |
153 }; | 162 }; |
154 | 163 |