Using javascript to dynamically change button icons

Sorry, I got confused on my first read. I think you got your issue solved on another thread.