Function cform ()
{
/// ------------------------ Data Source
VaR arr = [[1, 'Ben. bin Laden '], [2, 'stupid. bin Laden '], [3, 'stupid. lamps '], [6, 'stupid. 1'], [7, 'stupid. 2'], [8, 'stupid. 3'], [4, 'invincible '], [5, 'unattended'];
VaR reader = new Ext. Data. arrayreader (
{ID: 0 },
[
{Name: 'value '},
{Name: 'key '}
]);
VaR store = new Ext. Data. Store ({
Reader: Reader
});
Store. loaddata (ARR );
//--------------------------
// Test panel
VaR XForm = new Ext. Form. formpanel ({
/// Applyto: "MXT ",
/// Basic style
Basecls: 'x-plain ',
/// Layout
Layout: 'absolute ',
/// Submitted data
URL: 'save-form. php ',
// Effect of closing
Animcollapse: True,
/// Default input type
Defaulttype: 'textfield ',
Items :[{
X: 0,
Y: 5,
Xtype: 'label ',
Text: 'testing ...:'
},{
/// Whether to allow null
Allowblank: false,
// The prompt text for verification
Blanktext: 'verification prompt content, cannot be blank ',
X: 60,
Y: 0,
Name: 'to ',
Fieldlabel: 'text ',
Maskre:/[A-Za-Z]/GI,
Anchor: '200' // anchor width by percentage
},
/// Class
{
X: 300,
Y: 0,
Name: 'tozcxv ',
Anchor: '200' // anchor width by percentage
},
{
X: 0,
Y: 35,
Xtype: 'label ',
Text: 'testing :'
},{
X: 60,
Y: 30,
// Maskre: '/[A-Za-Z]/G ',
Name: 'starting ',
Anchor: '200' // anchor width by percentage
},{
X: 0,
Y: 60,
Xtype: 'textea ',
Name: 'msg ',
Anchor: '2014 100% '// anchor width and height
},
/// Time Button
{
X: 0,
Y: 200,
Xtype: 'datefield ',
Name: 'msgzcx ',
Anchor: '2014 50% '// anchor width and height
},
//// Time
{
X: 240,
Y: 200,
Xtype: 'timefield ',
Name: 'msgzcxdt ',
/// Increment of time
Increment: 10,
/// Text prompt for verification failure
Invalidtext: 'incorrect time format ',
Anchor: '2014 50% '// anchor width and height
},
/// Drop-down box
{
X: 0,
Y: 230,
Xtype: 'combo ',
/// Define the specific type select ComboBox
Fieldlabel: 'combobox ',
/// Whether to edit true ComboBox false select
Editable: True,
// Start retrieving at least a few words and display the search result conflict
Minchars: 2,
/// The size displayed on each page
Pagesize: 3,
/// Display when the value does not exist
Valuenotfoundtext: 'None of these options ',
/// Display fields
Displayfield: 'key ',
/// Data type local
Mode: 'local ',
/// Data Source
Store: Store
},
{
X: 0,
Y: 260,
Xtype: 'numberfield ',
Name: 'msgzcx ',
Anchor: '2014 100% '// anchor width and height
},
// Number
{
X: 0,
Y: 300,
Xtype: 'numberfield ',
Name: 'msgzcx ',
Anchor: '2014 100% '// anchor width and height
}
],
Buttons :[{
Text: 'login ',
Type: 'submit ',
// Define the form submission event
Handler: function (){
/// Submit the form
XForm. getform (). Submit ({
URL: 'operator. aspx? Action = 1save ',
Method: 'post ',
Success: function (Form, Action ){
Alert ('adsf ');
},
// Callback function for submission failure
Failure: function (){
Alert ('failed ');
}
});
// Callback function for successful submission
// Alert (XForm. getform ());
}
}]
});
VaR window = new Ext. Window ({
/// Title
Title: 'operator management ',
/// Width
Width: 500,
/// High
Height: 500,
/// Minimum bandwidth
Minwidth: 300,
/// Minimum height
Minheight: 200,
/// Layout Method
Layout: 'fit ',
/// Whether to allow resizing
Resizable: false,
/// Whether to allow drag
Draggable: True,
/// Close the button
Closable: True,
/// Whether the view is displayed
Constrain: True,
/// Whether the background is transparent
Plain: True,
/// Display the minimization button
Minimizable: True,
/// Maximize button
Maximizable: True,
/// Whether to display the shrink button
Expandonshow: True,
/// Whether the close button is displayed
Closable: false,
/// Close button style
Collapsedcls: "X-plain ",
/// Specifies whether to block an image when it is unavailable.
Maskdisabled: True,
/// Header text
Headerastext: "header title ",
/// Table
Bodystyle: 'padding: 5px ;',
/// Button Method
Buttonalign: 'center ',
Items: XForm,
Buttons :[{
Text: 'close'
},{
Text: 'cancel'
}]
});
Window. Show ();