I have a master page that wraps the body of each page in an update panel. The page I'm working on has a tab control with 2 tab panels. The first tab panel has a balloon popup extender for an asp hyperlink control the shows/hides an asp panel control. When navigating on this first tab, that extender works just fine. When I switch to the second tab panel, which doesn't fire a postback because of the update panel, it initially loads ok, but as soon as I trigger any kind of postback (full or async) I get a javascript Error: Unable to get property 'click' of undefined or null reference
I assume this is because the target and display controls of the extender are no longer rendered because they reside on the first tab. I'm wondering if there is a way I can disable or remove the click handlers for the popup extender when the tab changes using OnClientActiveTabChanged. Or remove/disable the extender handlers all together. I've tried a few different things (see below), but so far no luck. If anyone has any idea how to get past this error, I'll be much obliged.
function changeTab() {
var extenderBehavior = $find("DisplayCustCredit");
if ($find("<%=tcCreateCase.ClientID%>").get_activeTabIndex() != 0) {
if (extenderBehavior._popupVisible != true) {
extenderBehavior.showPopup();
}$removeHandler(extenderBehavior.get_element(), "click", extenderBehavior._clickHandler);$removeHandler(extenderBehavior.get_element(), "click", extenderBehavior._popupClickHandler);$removeHandler(extenderBehavior.get_element(), "click", extenderBehavior._displayOnClick);$removeHandler(extenderBehavior.get_element(), "click", extenderBehavior._bodyClickHandler);$removeHandler(extenderBehavior.get_element(), "click", extenderBehavior._popupElement);
extenderBehavior.hidePopup();
}
}