using jQuery UI 1.9.2 (upgraded from 1.8.23) and I see this on the Upgrade guide;
Deprecated url method and use of title attribute; use aria-controls attribute
(#7132) The url method has been deprecated in favor of leaving the href attribute unmodified even for remote tabs. The href attribute will point to the actual resource and the aria-controls attribute will point to the associated panel. This means that the title attribute will no longer be used to specify a custom panel id.
I have this code:
var $t = $("#tabs");
$t.tabs("url", 0, url);
$t.bind("tabsload", function (event, ui) {
console.log('tabsload fired');
});
$t.tabs("load", 0);
I cannot figure out how to set the url value for the tab (this code is fired when the user clicks on a grid row and the url value is rebuilt based on grid values) now as I do not understand the upgrade guide to use the aria-controls comment.
The approach I have taken is to set the
hrefof the AJAX link and then call theloadmethod to reload the content.I appreciate that this does not use the
aria-controlsattribute, but the snippet from the upgrade guide states that this attribute points to the panel – remote tabs receive their content based on anchor contained in thelielement, so I figured I should be able to use this approach.I am using a generic HTTP handler (this is the AJAX request) which simply echos back the text it is passed, e.g.,
Handler1.ashx?echo=some text to repeat. Note that my tabs consist of only one tab that makes an AJAX call to this handler.To change the Url, I handle the
clickevent of the button and modify thehrefofajax-linklike this and then reload it:So for this to work you will need to provide the link you wish to change with an ID and you will need to know at which position the tab page occurs.