PDA

View Full Version : [SOLVED] Render problem [I can't see anything]



talha06
19 Feb 2010, 10:02 AM
This is the 2nd time that I opened this topic.. I couldn't understand why mods don't see this topic as 'available to post'. :s

Anyway, hello to everyone,

I started using Ext JS 3.1.1 today (I created many websites with Ext JS 3.0); so I created a simple form; but unfortunately I couldn't see anything in browser. (I tried all of well-known browsers including Firefox, Chrome, IE, Safari) Can anyone help me?

Thanx & regards,
Talha



Ext.onReady(function() {
Ext.QuickTips.init();

var form = Ext.form.FormPanel({
frame : true,
id : 'form',
name : 'form',
title : 'Registeration Form',
border : true,
anchor : '95%',
//bodyStyle : 'padding:10px 10px 0;',
//autoWidth : true,
//autoHeight : true,
width : 300,
height : 150,
items : [{
xtype : 'textfield',
fieldLabel : '<b>Username</b>',
id : 'usernameText',
name : 'usernameText',
allowBlank : false,
emptyText : 'Enter your username..',
width : 200
}, {
xtype : 'textfield',
fieldLabel : '<b>Password</b>',
id : 'passwordText',
name : 'passwordText',
allowBlank : false,
inputType : 'password',
emptyText : 'Enter your password..',
width : 200
}],
buttons: [{
text : '<b>OK</b>',
id : 'okBtn',
name : 'okBtn',
handler : function() {
Ext.Msg.alert('Succeed', 'The form is submitted successfully.');
}
}]
});

var view = new Ext.Viewport({
renderTo : document.body,
frame : true,
layout : 'border',
items : [{
region : 'center',
items : [ form ]
}]
});
});

sunco
19 Feb 2010, 10:33 AM
var form = new Ext.FormPanel({

talha06
19 Feb 2010, 10:35 AM
var form = new Ext.FormPanel({

First of all, thanx a lot for ur help & reply.
But I tried it too, but unfortunately didn't work..

sunco
19 Feb 2010, 10:37 AM
Your code works with me if i modify that line. Weird :-?

talha06
19 Feb 2010, 10:38 AM
Your code works with me if i modify that line. Weird :-?
I was using Eclipse, I converted the project that is available for NetBeans.. Now it works, but I really didn't get it, what was the problem..

Anyway, thanx a lot my friend for ur help and support..