This worked really well and when data in the tab changes I can add the SAVE icon which fires the function when clicked. But, here's my problem: I need to know the TAB number which holds the pressed icon. Bearing in mind that it quite possibly won't be the SELECTED tab. How can I get the Tab number inside the function? I also need to keep in mind that some tabs may have been closed which may mess with any saved values.
Any suggestions?
var t = $('#tt');
var p = t.tabs('getSelected');
t.tabs('update', {
tab: p,
type: 'header',
options: {
iconCls: 'icon-ok',
tools:[{
iconCls:'icon-mini-refresh',
handler: function(){
alert('SAVE TAB #'+tabNo);
}
}]
}
})