mr.nothing
mr.nothing

Reputation: 5399

extjs type error el is null

I've got some odd error which I don't know how to overcome. Here is what I've got for now - one view with button on it, clicking on button will open a new empty window. So, when I'm doing the scenario below, I'm getting Type error el is null error. So here is the scenario:

  1. Open main view.
  2. Click on the button.
  3. Window is popped up.
  4. Close popped up window.
  5. Resize main view. (without resizing eveything is ok)
  6. Click on the button.
  7. Window is not popped up, but object is created and when I'm clicking on the button onу more time I'm getting the error, saying that it's impossible to create objects with similar id's. After Type error el is null error showed nothing is showed or rendered anymore, so this is pretty critical thing.

I saw some topics devoted to such a error, but the solution is not stated anywhere. Here is the topic where forum user Animal talked about this error and, again, solution is not provided overthere.

Upvotes: 1

Views: 3436

Answers (1)

Evan Trimboli
Evan Trimboli

Reputation: 30082

Since you didn't post any code...

The default closeAction of a window is to destroy it, which means the DOM gets cleaned up. You're probably doing something like:

var w = new Ext.window.Window();
w.show();
// Later on, user clicks close, which does:
w.close();

// Later
// Can't show, window is destroyed
w.show();

You either need to:

a) Set the closeAction to hide

b) Create a new instance of the window

Upvotes: 3

Related Questions