Ext.onready and Ext.MessageBox.alert
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Ext</title>
<script type="text/javascript" src="ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext/ext-all.js"></script>
<link rel="stylesheet" href="ext/resources/css/ext-all.css" type="text/css" />
<script type="text/javascript">
// any code that will execute after the HTML page has loaded
// has to be passed a function to execute.
Ext.onReady(function ()
{
/* this will be exectued on page_load */
alert("we're ready now");
});
</script>
</head>
<body>
<div id="content">
<div id="header">
<h1 id="header_one">My Site Title</h1>
</div>
<div id="site_content">
<p>Hello welcome to my site.</p>
</div>
</div>
</body>
</html>
Here is a [...]
Ext JS include order
When using Ext you must include the javascript files and base libraries in a specific order, otherwise any javascript code becomes a real headache and things don’t get defined.
So the helpful people at extjs.com put together this little table to show you what order files should be included in your HTML page.
It basically goes:
jQuery / [...]
JQuery, getting started with
Have a look at this tutorial if you’re not familiar with getting started with jQuery
keep looking »