AjaxControlToolkit.TabPanel.prototype._header_onclick 在将 ajaxtoolkit 1.0 升级到 3.0 后抛出错误。
下面是代码
AjaxControlToolkit.TabPanel.prototype._header_onclick = function(e) {
this.raiseClick();
if (isValidTabChange()) // add this additional code line to do validation
this.get_owner().set_activeTab(this);
};
错误是 AjaxControlToolkit 未定义,代码抛出并出错。有人遇到过这个问题吗?我可能做错了什么,我想知道有人以前已经解决了这个问题。
他们将 TabContainer UI 修改为 AjaxControlToolkit 4.1.7.1213 或 7.1213 中的 jQuery。
因此,您必须使用 actJQuery 而不是 Sys.Extended.UI 来访问 TabPanel 方法。
actJQuery.ajaxControlToolkit.tabPanel.prototype._headerOnClick = function (e) {
e.preventDefault();
if (confirm('Tabs are changing! Click OK to proceed, or click Cancel to remain on the current tab.')) {
this.options.owner.set_activeTab(this);
this.raiseClick(this);
this._header.focus();
} else return false;
}
提示:如果要检查选项卡面板中是否有任何控件更改,请使用此选项
$('form :input').change(function () {
$(this).closest('form').data('changed', true);
});
干杯