So, I'm working on a mapping application. In the app there are these toolbars and based on certain circumstances I would like to disable specific tools. When a tool is disabled it's image changes. This part works fine.
Now, there is all this Javascript that is in embedded script resources that is ran when certain actions occur, like selecting a tool. I have no power over this Javascript.
What happens is some Javascript gets ran that essentially changes the image back from it's disabled one to it's default one. This is bad.
I'd like to know if there is any way to tell if the code from the script resource has ran or any way to see when the image has been changed so I can immediately change it back. Essentially over-riding the code in the script resource.
To word it differently, whenever this icons image changes from the disabled one to the enabled one via this specific javascript code, can I immediately change it back to the disabled image?