O'Reilly logo

Ext JS 4 Web Application Development Cookbook by Stuart Ashworth, Andrew Duncan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Displaying a simple form in a window

Most websites and applications make use of windows and forms on a regular basis. Here you'll learn the basics for creating a simple form and window with Ext JS and combining the two to display the form to the user.

Displaying a simple form in a window

How to do it...

  1. Start by creating a simple form with two fields and a button.
    var form = Ext.create('Ext.form.Panel', { bodyPadding: 10, border: false, defaultType: 'textfield', items: [{ fieldLabel: 'Username', name: 'username', allowBlank: false }, { fieldLabel: 'Password', name: 'password', inputType: 'password', allowBlank: false }], buttons: [{ text: 'Login', formBind: true, disabled: true, handler: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required