ExtJS Tutorial – Hello world!

Thu, Oct 6, 2011

Uncategorized

In this very first post, i will write a simple extjs tutorial displaying an alert MessageBox contain text Hello World as an introduction in learning extjs. Before we start if you use firefox i suggest you to installing firebug. Firebug is very useful for debugging our extjs application if we found error on our application. In this tutorial i use extjs version 3.3.1.

Okay lets start.

1. Create a file and name it hello-world.html using your code editor. We need to add this lines of code and its required in order to our extjs application work correctly. Add this lines of code before </head> tag on your html file.

<link rel="stylesheet" href="ext-3.3.1/resources/css/ext-all.css" />
<script type="text/javascript" src="ext-3.3.1/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext-3.3.1/ext-all.js"></script>

2. If done add this lines of code after the codes above.

<script type="text/javascript">
	Ext.onReady(function() {
		Ext.MessageBox.alert('Message', 'Hello World');
	});
</script>

the codes above will display an ExtJS Alert MessageBox contain text Hello World.

here the complete codes

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Hello World!</title>
	<link rel="stylesheet" href="ext-3.3.1/resources/css/ext-all.css" />
	<script type="text/javascript" src="ext-3.3.1/adapter/ext/ext-base.js"></script>
    	<script type="text/javascript" src="ext-3.3.1/ext-all.js"></script>
    	<script type="text/javascript">
		Ext.onReady(function() {			
			Ext.MessageBox.alert('Message', 'Hello World');
		});
	</script>
</head>
<body>	
</body>
</html>

and here the screenshot of this tutorial

ExtJS Tutorial Hello World

if you want ti see the demo or/and download the file of this tutorial you can find it here

This post was written by:

- who has written 15 posts on ExtJS Tutorial.

M Abidir Rokhman is The Professional Blogger, Desktop and Web Programmer, Iam Blogger and really liked rich web programming like extjs. I wrestle blogger since 2008 until today contact me to Google+

Contact the author

One Response to “ExtJS Tutorial – Hello world!”

  1. Mr WordPress Says:

    Hi, this is a comment.
    To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.

    Reply

Leave a Reply