Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
Cant get Ajax call inside HTML from a external csv file

Hi I a been struggling with a Dash board can't get any data in from an external CSV file to render any charts. When I put an Alert tag it loops on the node.js HTTP server.

Htnl code to call AJAX

/======UPDATE
 var updateChart = function () {
    $.ajax({
        type: "GET",
        url: "podData.csv",
        dataType: "text",
        success: function(csv) {

   var dataPoints = csvLines = points = [];
   csvLines = csv.split(/[\r?\n|\r|\n]+/);
   UD=csvLines.length -2;
   points = csvLines[UD].split(",");
   }
  });

HTTP: NodeJS

var http = require('http');
var fs = require('fs');
http.createServer(function (req, res) {
  fs.readFile('./DFH_COP_dashboard_v1.html', function(err, data) {
    res.writeHead(200, {'Content-Type': 'text/html'});
    res.write(data);
    res.end();
  });
}).listen(8080);
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!