Developing Information and Question Boxes with the Ext JS Library
Welcome to the fourth article in a five-part series on building message boxes with the Ext JS framework. In this part of the series, I demonstrate how to create a couple of message boxes for displaying quick information and different questions to users of a web site.
Developing Information and Question Boxes with the Ext JS Library - Constructing an appealing question box (Page 4 of 4 )
As you might have guessed, in the content of the Ext JS framework, a question box is simply a message window that asks the user something, and nothing else. However, this simple process can be performed in a professional fashion by way of an elegant interface.
The following hands-on example illustrates how to build a question box in a few simple steps by using the “MessageBox” class included with this JavaScript library. Here’s the corresponding code sample:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Definitely, the above example should be really easy for you to grasp, since it looks nearly identical to the one that I coded in the previous section to build an info window. Of course, the only difference to spot here is the utilization of a “question” icon, which is displayed within the pertinent box.
The following line of code shows how the mentioned “question” icon is included into the message window:
icon: Ext.MessageBox.QUESTION
Finally, in order to complement the prior explanation, I included an additional screen capture that shows quite clearly how this question box looks. Here’s the pertinent image:
And with this concluding example I’m finishing this fourth tutorial of the series. As always, feel free to utilize all of the code samples developed in it, so you can expand your existing skills in building cool information and question boxes with the Ext JS library.
Final thoughts
In this fourth chapter of the series, you hopefully extended your experience in using the Ext JS framework, since I demonstrated how to create a couple of message boxes for displaying quick information and different questions to users of a web site.
In the last article, I’ll finish discussing the construction of information boxes with the Ext JS library by showing you how to create some warning and error windows.
Now that you’re well aware of the topics that will be covered in the final tutorial of the series, you won’t want to miss it!
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.