2 Replies Latest reply on Sep 7, 2010 7:24 AM by rootsounds

    PopUp Issue?

    flex4 Level 2

      Hi All

       

       

                         I have a scenario where i am using one button and when i click on that button it wil populate one popup window ... and that popup window contains title window ...  when i click on the button the popup created second time and when i click on third time the popup created third time.. so presently i have three popup created in my application... i dont want this,,, type of creation... if  once pop up created it will not allow to create the second popup .... i want it to throw an error where already popup created u cannot create second pop up ..

       

       

                         how many time i am cliking  on button it must open only one popup ... i dont want multiple popups created when i click button multiple times ....   i think u got my question .. please give me suggestions and code to achieve this issue......

        • 1. Re: PopUp Issue?
          BhaskerChari Level 4

          @flex4,

           

          Try to remove the focus from your button whenever you click the button once and your popup gets opened and try to set the Focus now on the PopUp by removing the Focus on Button. So that it will not be possible for you again to click the button once when the PopUp is already opened.

           

          Thanks,

          Bhasker

          • 2. Re: PopUp Issue?
            rootsounds Level 4

            It's because you keep creating new instances of the TitleWindow. Create a single instance and reuse it. This way it will maintain state and it shouldn't be displayed multiple times.