我刚刚从JQ UI 1.8.23切换到1.10。至于这个版本,ajaxOptions
被弃用,现在用ui.ajaxSettings
来代替。发布数据JQuery UI选项卡1.10
这是我的代码怎么看起来像:
$("#tabs").tabs({
ajaxOptions: {
type : 'POST',
data : 'format=html',
error: function(xhr, status, index, anchor) {
$(anchor.hash).html(
"Couldn't load this tab. We'll try to fix this as soon as possible. " +
"If this wouldn't be a demo. ");
},
success: function() {
*Something in here*
}
}
});
一切工作就好了。现在,新的代码:
$("#tabs").tabs({
beforeLoad: function(event, ui) {
ui.ajaxSettings.type = 'POST';
ui.ajaxSettings.data = 'format=html';
ui.jqXHR.error(function() {
ui.panel.html(
"Couldn't load this tab. We'll try to fix this as soon as possible. " +
"If this wouldn't be a demo.");
});
ui.jqXHR.success(function(){
*something in here*
});
}
});
所以我需要张贴此数据format=html
到我的服务器,但随着新版本发送到服务器,我的帖子变量是空的。什么都不会发送到服务器。另外,如果我想在我的php script
中获得POST变量,则该数组为空。我正在使用ZEND
顺便说一句。我需要通过POST发送它 - 这是无法解决的。
感谢您的帮助
你解决了吗?我已经搜查过,似乎没有解决办法。看起来像UI-Tabs设计有一个重要特征 - 添加后期数据的能力 - 遗漏了! – user1055761
http://bugs.jqueryui.com/ticket/8673 – damko