使用 fancybox 的 AJAX post 不起作用
我的脚本:
$("#sl_selections").fancybox({
'width' : 370,
'height' : 480,
'autoDimensions' : false,//(width != '' || height != '' ? false : true),
'autoScale' : false,
'showCloseButton' : false,
'titleShow' : false,
'padding' : 0,
'href' : $('#itemInteractivity .copyMove a').attr('href'),
'ajax' : { data: acao,type: 'post' }
});
在 PHP 中返回一个空帖子。如果我这样做会很有趣:
$.ajax({
type: 'post',
cache: false,
url: $('#itemInteractivity .copyMove a').attr('href'),
data: {data: acao}
});
工作正常,有什么想法吗?
my script:
$("#sl_selections").fancybox({
'width' : 370,
'height' : 480,
'autoDimensions' : false,//(width != '' || height != '' ? false : true),
'autoScale' : false,
'showCloseButton' : false,
'titleShow' : false,
'padding' : 0,
'href' : $('#itemInteractivity .copyMove a').attr('href'),
'ajax' : { data: acao,type: 'post' }
});
in PHP return an empty post. Interesting if I make this:
$.ajax({
type: 'post',
cache: false,
url: $('#itemInteractivity .copyMove a').attr('href'),
data: {data: acao}
});
works fine, any idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
老问题,但没有可接受的答案。
使用 Fancybox 2,我可以通过 AJAX 获取帖子以使用以下配置:
Old question, but no acceptable answer.
Using Fancybox 2, I am able to get a post via AJAX to work with the following configuration: