I am updating to .NET4.0 a web application that was running great in .NET3.5. after modifying Tab.pre.js
as shown below.
I am running into the following error with a Tab in apage.
I will appreciate any assistance, since I am hitting this for some hours now. Thank you.
ERROR:
=====
Message: Unable to get value of the property '_set_active': object is null or undefined
Line: 172
Char: 21
Code: 0
URI: http://localhost:2188/ScriptResource.axd?d=LRO2pV0XeaMfa-J8d9tYqGmsKrBTcFHXj2G-Ir9Qrcwq8VDcesStl0vOWHnCYLpes3fvh7zjznWEMRYO7y5GD3lX09cMBV_Pqrdz22xNfGo4QLfSveDaTkRbGdDUnaxBAFfs2Nt142UE9QvIwcI-Fg2&t=51e37521
Identified function _setActiveTabIndex on TabContainer.pre.js line 172.
File located: (Client/AjaxControlToolkit.JQuery/Tabs)
The error occurs at: self._tabs[opt.activeTabIndex]._set_active(false);
In debugging I see that self._tabs[opt.activeTabIndex] as undefined. throwing an error
I tried adding as suggested in another ISSUE adding, but no success:
<system.web.extensions>
<scripting>
<scriptResourceHandler enableCompression="false" enableCaching="true"/>
</scripting>
</system.web.extensions>
I had the tab working in .Net3.5 after making a modification to file Tab.pre.js line 345,
change shows below:
The original function was:
-----------------------
_app_onload: function (sender, e) {
if (this._cachedActiveTabIndex != -1) {
this.set_activeTabIndex(this._cachedActiveTabIndex);
this._cachedActiveTabIndex = -1;
var activeTab = this.get_tabs()[this._activeTabIndex];
if (activeTab) {
//activeTab._wasLoaded = true;
activeTab.set_wasLoadedOnce(true);
activeTab._setFocus(activeTab);
}
}
this._loaded = true;
}
Modified to:
--------------
_app_onload: function (sender, e) {
if (this._cachedActiveTabIndex != -1) {
this.set_activeTabIndex(this._cachedActiveTabIndex);
this._cachedActiveTabIndex = -1;
var activeTab = this.get_tabs()[this._activeTabIndex];
if (activeTab) {
if (activeTab._visibilityMode == 1) {
activeTab._wasLoaded = true;
//activeTab.set_wasLoadedOnce(true);
activeTab._setFocus(activeTab);
}
}
}
this._loaded = true;
}