Show More
@@ -297,12 +297,12 b' function format(str, replacements) {' | |||||
297 | } |
|
297 | } | |
298 |
|
298 | |||
299 | function makeRequest(url, method, onstart, onsuccess, onerror, oncomplete) { |
|
299 | function makeRequest(url, method, onstart, onsuccess, onerror, oncomplete) { | |
300 |
x |
|
300 | xhr = new XMLHttpRequest(); | |
301 |
x |
|
301 | xhr.onreadystatechange = function() { | |
302 |
if (x |
|
302 | if (xhr.readyState === 4) { | |
303 | try { |
|
303 | try { | |
304 |
if (x |
|
304 | if (xhr.status === 200) { | |
305 |
onsuccess(x |
|
305 | onsuccess(xhr.responseText); | |
306 | } else { |
|
306 | } else { | |
307 | throw 'server error'; |
|
307 | throw 'server error'; | |
308 | } |
|
308 | } | |
@@ -314,11 +314,11 b' function makeRequest(url, method, onstar' | |||||
314 | } |
|
314 | } | |
315 | }; |
|
315 | }; | |
316 |
|
316 | |||
317 |
x |
|
317 | xhr.open(method, url); | |
318 |
x |
|
318 | xhr.overrideMimeType("text/xhtml; charset=" + document.characterSet.toLowerCase()); | |
319 |
x |
|
319 | xhr.send(); | |
320 | onstart(); |
|
320 | onstart(); | |
321 |
return x |
|
321 | return xhr; | |
322 | } |
|
322 | } | |
323 |
|
323 | |||
324 | function removeByClassName(className) { |
|
324 | function removeByClassName(className) { |
General Comments 0
You need to be logged in to leave comments.
Login now