0

is the best way to catch up CSV with ajax? such as:

$(document).ready(function () {
    $.ajax({
        type: "GET",
        url: '/api/myapilink/',
        dataType: "json",
        success: function (data) {
            alert('Hello' + data);
        }
    });
});

The received data from the CSV http link is:

"objectno";"objectname";"objectclassname";"objecttype";"description";
"lastmsgid";"deleted"
"026";"Demo 1";"Car";"";"";"107711249";"0"
"027";"Demo 2";"Car";"";"";"105985957";"0"
"028";"Demo 3";"Car";"";"";"107794499";"0"

I hope someone has an example or know! (updated)

Bram
  • 49
  • 2
  • 11
  • http://stackoverflow.com/questions/7431268/how-read-data-from-csv-file-using-javascript – Satpal Jan 15 '14 at 21:14
  • You're missing a quote at the end of the URL. – Barmar Jan 15 '14 at 21:14
  • The get url part is not working (in the example from -Satpal.. my url likes : https://csv.csv_company.com?user=username&password=pass (etc).. – Bram Jan 15 '14 at 21:53
  • You could use `JSON` instead? http://api.jquery.com/jquery.parsejson/ I assume you have control over the output from `/api/myapilink` – Jeff Hines Jan 15 '14 at 22:04
  • Yep, but how do I get a right script with this? – Bram Jan 15 '14 at 22:20
  • can not find a solution .. the csv data is from a cross Damain and and headers, this has to be solved? – Bram Jan 16 '14 at 10:51

0 Answers0