Saturday, September 26, 2009

First ExtJs program


<html>
<head>

<!--
The following css and scripts are needed for any ext js programming.
ext-all.css is the css file, ext-base.js is the core ext js file
which helps in AJAX Communication, DOM Manipulation, Event Management.
ext-all-debug.js contains the ui components, data services, remoting, Drag & Drop and Utilities

-->
<link rel="stylesheet" type="text/css" href="../resources/css/ext-all.css" />
<script type="text/javascript" src="../adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../ext-all-debug.js"></script>
<script type="text/javascript">
Ext.BLANK_IMAGE_URL = '../resources/images/default/s.gif';
</script>

<script type="text/javascript">
function buildWindow() {
var win = new Ext.Window(

//Configuration Node for the Window
{
id : 'myWindow',
title : 'My first Ext JS Window',
width : 300,
height : 150,
layout : 'fit',
});
win.show(); // 3
}

//Entry point for any ext js code
Ext.onReady(buildWindow);


</script>
</head>
<body>

<script type='text/javascript'>
function highlightWindow() {
var win = Ext.getCmp('myWindow');
var winBody = win.body;
winBody.highlight();
}
highlightWindow.defer(1000);
</script>
</body>
</html>

No comments:

Post a Comment