Basically I have three dynamic map services and I have added all of them onto the map. Everytime I made a selection, I want the layers in my layerlist widget to change and the options displayed will be altered based on what layers are available in each of my map service.
Currently, I call the following function everytime a different map service is selected:
However, nothing has changed. Any suggestions?