jpace121 / jquery-csv

Automatically exported from code.google.com/p/jquery-csv
MIT License
0 stars 0 forks source link

TypeError: csv.replace is not a function #48

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Run in an html file with the following script: 
$(document).ready(function() {
    $.get( "report.csv", function(data){
        console.log(data);
        makeTable(data);
    }); 
});
function makeTable(fi) {
    var html = '<table class="table table-bordered">';
      var data = $.csv.toArrays(fi);
         for(var row in data) {
            html += '<tr>\r\n';
            for(var item in data[row]) {
              html += '<td>' + data[row][item] + '</td>\r\n';
            }
            html += '</tr>\r\n';
          }
// close table
html += "</table>";

// insert into div
$('#container').append(html);
} //makeTable

What is the expected output? What do you see instead?

It errors out with the error in the summary.  I will attach the CSV.  

What version of the product are you using? On what operating system?

0.71.min, running on osx 10.10, firefox.  

Please provide any additional information below.

The document is retrieved but the parser errors out.  When i run this same file 
against your fileupload demo it handles the csv file so this is probably my 
fault.  

Original issue reported on code.google.com by ImanMutt...@gmail.com on 4 Mar 2015 at 4:20

Attachments: