Team:Heidelberg/Templates/Awesomesheet

From 2014.igem.org

(Difference between revisions)
m
m
Line 10: Line 10:
       // and insert content into DOM element referenced by id
       // and insert content into DOM element referenced by id
-
       var file = src; //"PlateReader.zip"; //"https://2014.igem.org/File:Team_Heidelberg_Awesomesheet_Growth.zip";
+
       oReq = new XMLHttpRequest();
-
      var oReq = new XMLHttpRequest();
+
       oReq.open("GET", src, true);
-
       oReq.open("GET", file, true);
+
       oReq.responseType = "arraybuffer";
       oReq.responseType = "arraybuffer";
        
        
Line 18: Line 17:
var arrayBuffer = oReq.response; // Note: not oReq.responseText
var arrayBuffer = oReq.response; // Note: not oReq.responseText
if (arrayBuffer) {
if (arrayBuffer) {
-
  var byteArray = new Uint8Array(arrayBuffer);
+
    byteArray = new Uint8Array(arrayBuffer);
  var gunzip = new Zlib.Gunzip(byteArray);
  var gunzip = new Zlib.Gunzip(byteArray);
  var plain = gunzip.decompress();
  var plain = gunzip.decompress();

Revision as of 20:21, 17 October 2014