Friday 15 March 2013

json - JQuery get() results conversion -



json - JQuery get() results conversion -

i trying info outside domain not have access to. end goal able display table, or later dynamic chart. problem domain requesting info allows either homecoming datatype of "script", or "jsonp". other datattypes give me "no 'access-control-allow-origin' header nowadays on requested resource. origin 'null' hence not allowed access." error. file need access .csv file. tried using next code:

$(document).ready(function(){ $("#test").click(function(){ var url = "outsidedomain.com"; $.get( url, function (data) { var datastr = new string(data); datatotable(datastr); }, "script"); }); });

when utilize above code, receive "resource interpreted script transferred mime type application/csv" warning, , "uncaught syntaxerror: unexpected identifier" error. how , manipulate info in .csv file using jquery under these circumstances?

jquery json jsonp

No comments:

Post a Comment