Message Boxes and Alerts
If you are still using crappy browser alert boxes - lets take a look at the amazingly seductive Ext.Msg class in the ExtJs library.
The Ext.Msg class does some nice things like Masking the screen whilst it is active, you can set up buttons to get a response and populate it with virtually anything from the page..
If you want some quick eye candy - check this one out!
Worth noting...
Buttons in the Ext.Msg class are set up using CONSTANTS, like YESNOCANCEL which provides (amaxingly) 3 buttons which you can test against [YES] [NO] [CANCEL]
We used...
- Ext.Msg (or) Ext.MessageBox : Message boxes and alert boxes.
- show -> Shows a Message Box on screen with various config options available.
- Ext.Element : Provides methods/functions to retrive DOM/Page elements.
- get -> We use this to get the innerHTML attribute of an element
Try it out!
Ext.Msg is a COOL class.
It certainly is!
And look how easy it is to take elements like me from the page and show them inside the message box when you use Ext.get(el).dom.innerHTML !
