Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

195
Views
How to destroy previous instance of window?

I have a button with a click function like this

var win = Ext.create('Ext.window.Window', {
                            title: 'We want your Feedback!',
                            cls: 'Hub-feedback-form',
                            //height: 320,
                            width: 300,
                            layout: 'fit',
                            closable: true,
                            closeAction: 'destroy',
                            items: [form]
                            
                        });
win.show();
winVisible++ //winVisible is a global variable declared as 0.
if(winVisible % 2==0)
{
win.hide();
}

But what is happening is it is creating multiple instances of win, so everytime an insstance remains, how to modify the code so that every open instance of win gets removed. Please help!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can call win.close(), it will remove the component and destroy it.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!