Ajax(jQuery) strange file post problem
Posted
by faya
on Stack Overflow
See other posts from Stack Overflow
or by faya
Published on 2010-05-16T09:10:40Z
Indexed on
2010/05/16
9:20 UTC
Read the original article
Hit count: 218
Hello,
I have a problem posting file via ajax jQuery function. I have something like this:
$('#my_form').submit(function() {
var serialized = $(this).formSerialize();
var sUrl = "xxx";
$.ajax({
url: sUrl,
type: "POST",
data: serialized,
success: function(data) {
$(".main_container").html(data);
}
})
return false; // THIS return statment blocks sending file content
});
When I remove return false statement everything is okey, server side gets the file content and etc, but when it's there (i monitor with firebug) that this posting sends only file name. What can be wrong?
P.S. - I need this return false statement, because I want to manipulate return data myself.
© Stack Overflow or respective owner