开发者

AjaxControlToolkit.TabPanel.prototype._header_onclick throws error

AjaxControlToolkit.TabPanel.prototype._header_onclick throws an error after upgrading ajaxtoolkit 1.0 to 3.0.

Below is the code

 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);
        };

The error is AjaxControlToolkit is undefined and the code throws and error. Did anyone come across this issue? I might be doing something wrong, I want to know someone has resolved this issue befo开发者_如何学Gore.


They modify the TabContainer UI to jQuery in AjaxControlToolkit 4.1.7.1213 OR 7.1213.

So you have to use actJQuery insted of Sys.Extended.UI to access the TabPanel methods.

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;
    }

Tip: Use this if you are checking if any control changed in tabpanel

$('form :input').change(function () {
        $(this).closest('form').data('changed', true);
});

Cheers

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜