javascript - Didn't get response on alert formate in ajax -
I'm using it for my site. I want the My php code which gives feedback in this json format. This code works fine on firebug, but not on the screen. script.js upload.php warning () feedback, either this is a success or error. I have tried to put the code on script.js like this, but there is no success. I like the tired code:
done: function (e, data) {alert status} ; // ['status'] like data; Data.context.text (data.Status); },
if (file_exists ($ TargetFolder. '/'. $ _ Files ['upl'] ['name'])) {echo '{"status": "Image already exists "} '; Go out; } If (! In_Are (stroller ($ extension), $ permission)) {echo '{"status": "Extension is not allowed"}'; Go out; } "{" Status ":" success ") '' ('_'} '; go out;}
done: function (e, data) {//console.log(data.status); // ['Status']; console.log (data.result); // "{" status ":" extension is not allowed "}" var results = jQuery. PRJSNSAS (data.resist); console as data. Log (result.status); // "extension is not allowed" if (result.status! = "Success") {//data.context.addClass('error '); // file name color "red" Data is. Context.text (result.status);}},
Comments
Post a Comment