PDA

View Full Version : try to learn



v221919
10 Apr 2012, 3:35 AM
when i run this page i am not able to see anything in the browser i.e blank.
As I am new to extjs so pls help.



<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!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 runat="server">
<title>Untitled Page</title>
<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css">
<script type="text/javascript" src="extjs/ext-debug.js"></script>
<script type="text/javascript" src="extjs/ext-all-debug.js"></script>
<script type="text/javascript" src="extjs/ext-all.js"></script>
<script type="text/javascript" src="app.js">

</script>
</head>
<body>
<form id="form1" runat="server">

</form>
</body>
</html>

app.js


Ext.define('MyApp.MyWindow', {
extend: 'Ext.Window',
title: 'Welcome!',
initComponent: function() {
this.items = [{
xtype: 'textfield',
name: 'tfName',
fieldLabel: 'Enter your name'
}],
this.callParent(arguments);
}
});
var win = Ext.create('MyApp.MyWindow');
win.show();

fschaeffer
10 Apr 2012, 4:24 AM
Hello,

please only include ONE library, so either

ext-debug.js (then you'll have to enable dynamic loading via Ext.Loader)

or

ext-all.js (complete library compressed)

or

ext-all-debug.js (this should be the one during development, all classes included and debug-enabled)

HTH
Florian

vietits
10 Apr 2012, 4:31 AM
You should include only one of ext-debug.js, ext-all-debug.js, ext-all.js.



<!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 runat="server">
<title>Untitled Page</title>
<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css">
<!--script type="text/javascript" src="extjs/ext-debug.js"></script-->
<!--script type="text/javascript" src="extjs/ext-all-debug.js"></script-->
<script type="text/javascript" src="extjs/ext-all.js"></script>
<script type="text/javascript" src="app.js"></script>
</head>

v221919
10 Apr 2012, 6:02 AM
Still same problem.

chramer
10 Apr 2012, 6:12 AM
app.js

Ext.application({
name: 'app',
launch: function () {

Ext.define('MyApp.MyWindow', {
extend: 'Ext.Window',
title: 'Welcome!',
initComponent: function () {
this.items = [{
xtype: 'textfield',
name: 'tfName',
fieldLabel: 'Enter your name'
}], this.callParent(arguments);
}
});
var win = Ext.create('MyApp.MyWindow');
win.show();
}
});

v221919
10 Apr 2012, 6:16 AM
Thanks Chramer.. it works