0
从我的主页我打开一个fancybox,我通过JQUERY AJAX请求提交信息。无法在IE和Chrome中使用jQuery Ajax重新加载DIV
然后,此提交应使用JQUERY .LOAD命令在主页上填充DIV。
奇怪的是,我只能得到这个在Firefox中工作。
我喜欢它也适用于Chrome和IE浏览器,但无法看到我的AJAX调用出现问题。有人能帮助吗?
$.ajax({
type: "POST",
url: "../ajax/add-ingredient-to-recipe.php?"+dataString,
dataType: "html",
data: dataString,
}).done(function(){
top.frames.$.fancybox.close(true);
top.frames.$('.calorie-table').load('./views/nutritional-data.tmp.php', function(){
top.frames.$('.calorie-table').hide();
top.frames.$('.calorie-table').fadeIn(800).css({backgroundColor: "#dddddd" });
});
});
你得到任何控制台Chrome中出现错误?查看开发人员标签 编辑:嗯看起来像top.frames无法在Chrome中工作。看看这个问题:http://stackoverflow.com/questions/18762352/top-frames-wont-work-in-chrome – Ruben
我怀疑'top.frames'是什么导致你的问题:http://跨浏览器.com/talk/inter-frame_comm.html –
我认为top.frames可能会导致一些问题,但是,如果我删除它fancybox甚至不会关闭。我会检查你提供的链接Jeffrey – useyourillusiontoo