sql - As create json file with data in JavaScript, and send that file for JSONP other domain -


i need big doubt.

question: can create json file (with data) js code?

the reason need use jsonp, , wanna take data other domain (i.e. http://www.example.com/data/clients.json?callback=?), data storage in db (websql) , need data written in json file (i.e. clients.json)

please need because 3 days ago try this, don't find yet answer.

p.s.: sorry english, not native language.

edit

sorry question confused. try again steps.

i need write json file data or records db (websql). functions working (add record, update record, delete), need put data in json file because, i'll use next code data other domain.

(function($) {     var url = 'http://www.example.com/scripts/clients.json?callback=?';     $.ajax({     type: 'get',     url: url,     async: false,     jsonpcallback: 'jsoncallback',     contenttype: "application/json",     datatype: 'jsonp',     success: function(json) {         console.dir(json.sites);     },     error: function(e) {         console.log(e.message);     } }); })(jquery); 


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -