views:

47

answers:

0

Hi.

I have LinkButton and AnimationExtender for it. Also sometimes I need to disable LinkButton via JavaScript.

I have my own function (because of problems with disabling LinkButton in FF).

     function disableAnchor(obj, disable) {
        if (disable) {
            var href = obj.getAttribute("href");
            if (href && href != "" && href != null) {
                obj.setAttribute('href_bak', href);
            }
            obj.removeAttribute('href');
            obj.style.color = "gray";
            obj.disabled = true;            
        }
        else {
            obj.setAttribute('href', obj.attributes['href_bak'].nodeValue);
            obj.style.color = "blue";
            obj.disabled = false;
        }
    }

All is good in IE, but in FF animation is played even if LinkButton is disabled.

related questions