2 Replies Latest reply on Jun 6, 2008 6:39 AM by Kurt Mossman

    Combo box and PopUpWIndow.

    xrum Level 2

      i want to pop a window, if a "New" is selected in the combobox.

      the pop up window, will have an OK and CANCEL buttons. if okay is seleted, i want the combo value to stay as "new", if it's canceled, i need it to go back to what it was before.

      i can't figure out how to do it. After i drop down to "new", and cancel, it stays "new" (in the combobox) instead of going back to previous value.

      any help would be appreciated.

        • 1. Re: Combo box and PopUpWIndow.
          John Hall Level 4
          What I do with that kind of thing is upon the user selecting, I use a manager class to store the current value before changing anything. Upon clicking the cancel button, I go back to the manager class and set the text and selectedIndex to the previous settings. Hope that makes sense.
          • 2. Re: Combo box and PopUpWIndow.
            Kurt Mossman Adobe Employee

            John is right. The trick here is to capture the value before the change event and you can do this with the click event. I have attached a simple example. Once you have the value you can reset the selectedIndex. In the example I used the selectedItem.item to display the text, you could just use the selectedIndex in your code.