Mercurial > hg > webaudioevaluationtool
diff core.js @ 1628:244ca9c8546d
If projectReturn is specified as a url it will return to that server. Currently only tested using the localHost server on port 8000, as per the python2.py server included
author | Nicholas Jillings <nickjillings@users.noreply.github.com> |
---|---|
date | Tue, 26 May 2015 18:47:59 +0100 |
parents | 9319c38cc278 |
children | d6303bdef165 |
line wrap: on
line diff
--- a/core.js Tue May 26 18:43:30 2015 +0100 +++ b/core.js Tue May 26 18:47:59 2015 +0100 @@ -270,10 +270,10 @@ // If destURL is null then download XML in client // Now time to render file locally var xmlDoc = interfaceXMLSave(); + var parent = document.createElement("div"); + parent.appendChild(xmlDoc); + var file = [parent.innerHTML]; if (destURL == "null" || destURL == undefined) { - var parent = document.createElement("div"); - parent.appendChild(xmlDoc); - var file = [parent.innerHTML]; var bb = new Blob(file,{type : 'application/xml'}); var dnlk = window.URL.createObjectURL(bb); var a = document.createElement("a"); @@ -287,6 +287,11 @@ popup.showPopup(); popup.popupContent.innerHTML = null; popup.popupContent.appendChild(submitDiv) + } else { + var xmlhttp = new XMLHttpRequest; + xmlhttp.open("POST",destURL,true); + xmlhttp.setRequestHeader('Content-Type', 'text/xml'); + xmlhttp.send(file); } return submitDiv; }