Mercurial > hg > webaudioevaluationtool
comparison js/core.js @ 2335:e22ec7b6cfbd
If returnURL is not provided now the correct message is displayed #60
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Tue, 10 May 2016 16:55:06 +0100 |
parents | ee5e2db32f7c |
children | d347dbab980d |
comparison
equal
deleted
inserted
replaced
2333:170b024563ab | 2335:e22ec7b6cfbd |
---|---|
463 var response = xmlDoc.getElementsByTagName('response')[0]; | 463 var response = xmlDoc.getElementsByTagName('response')[0]; |
464 if (response.getAttribute("state") == "OK") { | 464 if (response.getAttribute("state") == "OK") { |
465 window.onbeforeunload = undefined; | 465 window.onbeforeunload = undefined; |
466 var file = response.getElementsByTagName("file")[0]; | 466 var file = response.getElementsByTagName("file")[0]; |
467 console.log("Save: OK, written "+file.getAttribute("bytes")+"B"); | 467 console.log("Save: OK, written "+file.getAttribute("bytes")+"B"); |
468 if (typeof specification.returnURL == "string") { | 468 if (typeof specification.returnURL == "string" && specification.returnURL.length > 0) { |
469 if (specification.returnURL.length > 0) { | |
470 window.location = specification.returnURL; | 469 window.location = specification.returnURL; |
471 } | |
472 } else { | 470 } else { |
473 popup.popupContent.textContent = specification.exitText; | 471 popup.popupContent.textContent = specification.exitText; |
474 } | 472 } |
475 } else { | 473 } else { |
476 var message = response.getElementsByTagName("message"); | 474 var message = response.getElementsByTagName("message"); |