[英]posting serialized data with jquery ajax in IE6 not working
when i post some data with jquery ajax command in ie6 and i 当我在ie6和我用jquery ajax命令发布一些数据时
print_r($_POST)
print_r($ _ POST)
php print an empty array.. php打印一个空数组。
i can alert this data with alert function in ie by adding this line of code: 我可以通过添加以下代码行来使用警报功能来警报此数据:
alert(form_data)
警报(form_data)
how can i post submited data to php?i dont know where the problem is in ie6? 我如何将提交的数据发布到php?我不知道问题在哪里? this is my code for posting data
这是我发布数据的代码
$('#submit').live('click', function(e) {
e.preventDefault();
var post = $(this).attr("name") + "=submit";
var form_data = $('#create_album_form').serialize() + "&" + post;
$.ajax({
type: "POST",
url: "create_album.php",
data: form_data
}).done(function( data ) {
$('#album_data').html('');
$('#album_data').html(data);
$('#album_data').delay(1000).trigger('reveal:close');
if(data == '<div class="success">آلبوم شما با موفقیت ساخته شد</div>'){
$('#myalbums').load('update_albums.php').fadeIn('500');
}
});
});
.live()
在jQuery 1.9.x中已删除,请改用.on()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.