views:

532

answers:

1

I am fairly new to JScript and I am looking for a way to subscribe to the event when a textbox is disabled or enabled. I am creating a AJAX Extender Control and I am subscribing through the JScript:

$addhandler(textbox, 'EventName', Function);

I have it working for "click", "focus" and "blur", but I'd like to get enable disable working. Is there an exhaustive list of events that can be hooked into out there? I've tried googling everything I know.

+1  A: 

I don't think there's any simple solution to this.

Firstly, there are two properties for form elements which you may want to look at: disabled and readonly. They both behave differently.

Secondly, there is no specific browser event that will trigger when those properties are changed. PPK has a good list of events and their browser support. The closest you can come is something like the funky DOMAttrModified or DOMSubtreeModified - but I don't think these work across all browsers.

Sam C
Wow, there are a lot of No's next to those two events. Looks like I'll have to find another way around this. Good to know there's a good reference for these situations though. Thanks.
helios456