View Full Version : Event? ComboBox onchange
Dumas
8 Mar 2009, 10:11 PM
hi!
I couldn't find a list of all Events available, nor what I would need to call a function when the content of a ComboBox is changed.
I have a ComboBox, created from a JsonStore, which should load new form data when it is changed, which event do I have to use and do I have to change something else as well in my listener?
listeners: { 'update': {fn:function(){
fs.form.load({
url:'host.com/example.json',
method:'GET',
waitMsg:'Loading...'
});
}
thx
Dumas
shibubh
8 Mar 2009, 10:18 PM
what you mean content of a ComboBox is changed.
try
change event. thisn is only fire when the text in the combo box (display) changed
mystix
8 Mar 2009, 10:18 PM
http://extjs.com/deploy/dev/docs/?class=Ext.form.ComboBox&member=change
http://extjs.com/deploy/dev/docs/?class=Ext.form.ComboBox&member=select
p.s. look carefully. all the other ComboBox events are listed there too.
Dumas
8 Mar 2009, 11:53 PM
thx, works fine!
But there's still one Problem!
Change fires (just before) onBlur, but when I change the ComboBox value and then Click in the HtmlEditor, it doesn't blur, why?
thx
Dumas
angushj
10 Mar 2009, 7:11 PM
maybe like this listeners?
new Ext.form.ComboBox({
fieldLabel: '????',
id: 'selTypeList',
anchor: '50%',
editable: false,
msgTarget: 'side',
listeners :{select: changeType}, //this
}),
"changeType" is the function name
Animal
11 Mar 2009, 12:13 AM
thx, works fine!
But there's still one Problem!
Change fires (just before) onBlur, but when I change the ComboBox value and then Click in the HtmlEditor, it doesn't blur, why?
thx
Dumas
I think it's because the HtmlEditor is in a different document.
Dumas
13 Mar 2009, 5:15 AM
No, it's in the same FormPanel, but in another fieldset, could that be the reason?
But that would be strange...
thx
Dumas
Animal
13 Mar 2009, 5:25 AM
No, it is a different document.
Check it. It's how WYSIWYG editors work.
Dumas
17 Mar 2009, 8:08 PM
Oh sry, I thought you ment I put it in a different document....
Is there any work around?
Any Ideas?
Thx!
Dumas
Powered by vBulletin® Version 4.2.3 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.