php - JSON Clarification -
can please me breakdown statement below... base_url pointing can assume directory contained .csv file.
given have custom .csv file on server, changed address of base_url, i'm not seeing data.
i have million questions around short deadline. appreciated.
btw... i've looked through jquery site sites try , understand.. appreciated.
$.getjson(this.base_url+"?callback=?", {cmd:"getmakes", year:"2009"}, function(data) { //the 'data' variable contains response data. var makes = data.makes; (var = 0; < makes.length; i++) { //you can response data alert(makes[i].make_display); } });
from looking @ syntax of script , context being used in, throw out there say, 'this.base_url' not supposed .csv file.
first, $.getjson, set request webserver. if request csv file, make sense, getting csv file. but, json keyword added, meaning expecting formatted json response request.
secondly, adding data, ?cmd=getmakes&year=2009. csv file nature flat file on filesystem. not smart file, meaning not driven logic, unless redirect within .htaccess file or mime type modifications.
you looking file other .csv. framework allow interpret link such http://domain.com/api/function, looks url extension omitted.
Comments
Post a Comment