से मूल्य कैसे प्राप्त करें असल में मेरे पास नीचे एक विंडो के साथ फ़ॉर्म बनाने के लिए एक ExtJs स्क्रिप्ट है।Ext form
var frmAccount = Ext.create('Ext.form.Panel',{
bodyPadding: 5,
frame : true,
items :[
{
xtype : 'textfield',
fieldLabel : 'Account Number',
name : 'accountNum'
},{
xtype : 'textfield',
fieldLabel : 'Company',
name : 'company'
},{
xtype : 'textfield',
fieldLabel : 'Office',
name : 'office'
},{
xtype : 'textareafield',
fieldLabel : 'Address',
name : 'address',
width : 350
},{
xtype : 'textfield',
fieldLabel : 'City',
name : 'city'
},{
xtype : 'textfield',
fieldLabel : 'Country',
name : 'nation'
}]
});
var winAddAccount = Ext.create('widget.window',{
id : 'addAccount',
title : 'Filter Record',
width : 400,
height : 300,
modal : true,
closeAction : 'hide',
items : frmAccount,
layout : 'fit',
bodyPadding: 5,
buttons:[
{
text : 'Find',
handler: function(){
//console.log(form value);
}
},
{
text : 'Cancel',
handler: function(){
winAddAccount.hide();
}
}
]
});
मैं बस के बाद मैं बटन 'खोज' पर क्लिक करें रूप से मान प्राप्त करना चाहते हैं। लेकिन मुझे 'ढूंढें' बटन पर क्लिक करने के बाद फॉर्म से मूल्य प्राप्त करने के बारे में पता नहीं है। उम्मीद है कि मैं हैंडलर पर console.log
स्क्रिप्ट के साथ मान देख सकता हूं। कृपया मुझे एक विचार हल करने या सुझाव देने में मदद करें। धन्यवाद।
+1, दूसरा विकल्प आईडी द्वारा विंडो से पूछताछ करना है, लेकिन यह बेहतर है। मैं शायद ही कभी अपने घटकों में आईडी के साथ काम करता हूं। अधिकांश समय क्योंकि मेरे पास एक ही खिड़की के कई उदाहरण खुले हो सकते हैं। –
ओह भगवान..तुम्हें धन्यवाद .. लेकिन, फ़ॉर्म से सीधे मूल्य कैसे प्राप्त करें? जैसे कि मैं सिर्फ फॉर्म से 'ऑफिस' मान प्राप्त करना चाहता हूं .. – user1875301
@ user1875301 मेरा संपादन देखें – sra