Ditto on what welegan said above about asking specific questions.
Here's a complete example, no jQuery or CSV plugins needed.
This is more verbose then using jQuery, but there's no magic, so hopefully you can follow the logic better.
The data file is movies.csv:
The Matrix,8.7,http://www.imdb.com/title/tt0133093/
Star Wars,8.9,http://www.imdb.com/title/tt0076759/
The code:
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Load CSV, Parse CSV, Make HTML, Add to DOM - Demo</title>
<script>
// immediately invoked function expression - aka "Iffy"
(function(){
"use strict";
window.onload = loadCSV;
var myArray = [];
var FILE_NAME = "movies.csv";
function loadCSV(){
// declare all our variables at the top
var bigString, lines, tempArray, tempObject, xhr;
// XHR can load local files easily - no jQuery needed!
xhr = new XMLHttpRequest();
// set up callback function for when file is loaded
xhr.onload = function(e){
bigString = e.target.responseText; // or bigString = xhr.responseText
// array.split() string on carriage return to create an array of records
lines = bigString.split("\n");
// loop through records and split each on commas
lines.forEach(function(line){
tempArray = line.split(",");
tempObject = {};
tempObject.title = tempArray[0];
tempObject.rating = tempArray[1];
tempObject.link = tempArray[2];
myArray.push(tempObject);
});
// check out your array of "movie" objects!
console.log(myArray);
displayLinks(myArray);
}
//xhr.open(method, path, asynch);
xhr.open("GET", FILE_NAME, true);
xhr.send();
};
function displayLinks(array){
var html = '<ul>';
array.forEach(function(o){
html += '<li>';
html += '<a href="';
html += o.link;
html += '">';
html += o.title;
html += ' - rating = ';
html += o.rating;
html += '</a>';
html += '</li>';
});
html += '</ul>';
document.body.innerHTML = html;
}
}());
</script>
</head>
<body>
</body>
</html>