PDA

View Full Version : Ext application in Visual Studio fails to load the view sometimes



Mansi
24 Aug 2012, 11:08 PM
I simply added a folder named 'ExtJSApp' to Scripts folder of my solution. ExtJSApp folder contains a subfolder 'extjs-4.1.1' that has ext-debug.js,ext-all.js and other required Ext files.ExtJSApp folder also contains an app.js file. In app. js,the code written is:
Ext.onReady(function () {
Ext.application({
name:'AM', launch:
function () {
Ext.create(
'Ext.container.Viewport', {
layout:'fit',
items: [
{
xtype:'panel',
title:'Users',
html:'List of users will go here' }

]
});
}
});
});


I included the following in the head section of WebForm1.aspx of my application:<scriptsrc="Scripts/ExtJSapp/extjs-4.1.1/ext-debug.js"type="text/javascript"></script>
<scriptsrc="Scripts/ExtJSapp/extjs-4.1.1/ext-all.js"type="text/javascript"></script>
<scriptsrc="Scripts/ExtJSapp/app.js"type="text/javascript"></script>


This is all that my Visual Studio solution cintains. Strange thing is that when I try to view WebForm1.aspx in browser,sometimes the ExtJS panel is not rendered, but I can see the panel at other times!! What's the reason and how to fix it?? Plz help me out.

vietits
24 Aug 2012, 11:18 PM
Just include ext-debug.js or ext-all.js, not both.