AJAX Returning all False
Posted: Mon Aug 02, 2010 12:54 pm
All my AJAX is returning false, I think it could be something about serializing my data but I'm not exactly sure what that means. However this is my jQuery AJAX Post
[text]
$.post(
"post_updateImages.php",
function(data){
if (data.success)
$("#fileView").css({'color':'green'}),
$("#fileView").html(data.message);
else
$("#fileView").css({'color':'red'}),
$("#fileView").append("failure");
},
"json"
);
[/text]
in FireBug my response comes back like this:
[text]
{"success":true,"message":"<img src='uploaded\/07312010075.jpg'\/> <br><img src='uploaded\/07312010074.jpg'\/> <br><img src='uploaded\/07312010073.jpg'\/> <br><img src='uploaded\/07312010072.jpg'\/> <br>"}
[/text]
1) even though my success returns true, JSON automatically finds it false... and it never appends any of my message variable either. could this have something to do with serialize (not sure what that is though)?
[text]
$.post(
"post_updateImages.php",
function(data){
if (data.success)
$("#fileView").css({'color':'green'}),
$("#fileView").html(data.message);
else
$("#fileView").css({'color':'red'}),
$("#fileView").append("failure");
},
"json"
);
[/text]
in FireBug my response comes back like this:
[text]
{"success":true,"message":"<img src='uploaded\/07312010075.jpg'\/> <br><img src='uploaded\/07312010074.jpg'\/> <br><img src='uploaded\/07312010073.jpg'\/> <br><img src='uploaded\/07312010072.jpg'\/> <br>"}
[/text]
1) even though my success returns true, JSON automatically finds it false... and it never appends any of my message variable either. could this have something to do with serialize (not sure what that is though)?