View Full Version : How do I modify the popup window that is shown in the example...

30 Apr 2010, 1:30 PM
Guys, in the example code located http://www.extjs.com/deploy/dev/examples/message-box/msg-box.html when u click on the individual buttons a popup appears for a short duration then closes.

I have been playing around with the code this afternoon but I cant figure out a couple of things.
I want to keep the window open and if a user clicks something I want to modify the content in the window. However currently new windows keep popping up. so... .

How do I reference it and if it is to overwrite it? Ext.get('msg_win') .... ?
I am trying to get this functioning in the Example desktop application but each time a popup from this opens it pushes the rest of the page down. How do I prevent that from happening? Can I set the layer to be over everything else like in Flash?
Are there any examples that someone can point me to for a reusable popup box? I want to use this to display custom layouts. So if its open it gets redrawn with new information and if its closed then open and write the layout information to it.
Thanks for looking.

4 May 2010, 10:16 AM
1) You don't. Ext.MessageBox is a singleton.

2) You must have something going on in your page to be making that happen.

3) Create your own singleton. Look at the MessageBox class source as a guide.

5 May 2010, 7:01 AM
Thanks for the response, however to clarify my question, it was not the Ext.alert I was referencing, it was the popup that appears after closing the Ext.alert. It appears at the top of the page. What I want is to use that type of feature on my page however I do not want to have it go away on its own but have the user close it, and if its open and a user selects something different to have it overwrite the content of the box. The first issue I have is that it pushes the entire page down. So, I would want this to be a new layer over entire document instead of pushing down the content of the document body.

5 May 2010, 7:06 AM
Look at the source. It's not part of the core UI framework, but it can be used.

It should not push down the entire document body. You must be doing something incorrect. Look at how the examples are constructed and copy/mimic it.