Results 1 to 9 of 9

Thread: Event? ComboBox onchange

  1. #1
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    589

    Default Event? ComboBox onchange

    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

  2. #2
    Ext User shibubh's Avatar
    Join Date
    Jul 2007
    Location
    Lamahi,Dang Nepal
    Posts
    449

    Default

    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
    Shibu Bhattarai

    Use JavaScript beautifier to beautify you code http://jsbeautifier.org/

    Code Conventions http://javascript.crockford.com/code.html

    ExtJS Core Manual http://extjs.com/products/extcore/manual/

  3. #3
    Sencha User mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,232

    Default

    http://extjs.com/deploy/dev/docs/?cl...&member=change
    http://extjs.com/deploy/dev/docs/?cl...&member=select

    p.s. look carefully. all the other ComboBox events are listed there too.

  4. #4
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    589

    Default

    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

  5. #5

    Default

    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

  6. #6
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    Quote Originally Posted by Dumas View Post
    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.

  7. #7
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    589

    Default

    No, it's in the same FormPanel, but in another fieldset, could that be the reason?
    But that would be strange...

    thx
    Dumas

  8. #8
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    No, it is a different document.

    Check it. It's how WYSIWYG editors work.

  9. #9
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    589

    Default

    Oh sry, I thought you ment I put it in a different document....

    Is there any work around?
    Any Ideas?

    Thx!
    Dumas

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •