I just switched from JQ UI 1.8.23 to 1.10. As for this version, ajaxOptions
is deprecated and now ui.ajaxSettings
is used instead.
This is how my code looked like:
$( "#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*
}
}
});
everything worked just fine. Now the new code:
$( "#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*
});
}
});
So I need to post this data format=html
to my server but with the new Version my post variables sent to the server are empty. Nothing is sent to the server. Also, if I want to get the POST-variables in my php script
the array is empty. I am using ZEND
btw. I need to send it via POST - there is no way around it.
Thanks for your help