Results 1 to 2 of 2

Thread: Access combo box values

  1. #1

    Question Access combo box values

    Hi,

    I'm trying to setup fusion charts inside of a panel. The charts use AJAX to update their display based on some user choices.

    I've done this before EASILY in HTML with just a touch of javascript. I just have a "onclick" setup for the button the user clicks. I then use the DOMID of the selections to formulate a new "data url" and pass that to the chart object. Easy.

    I am trying to do the same thing in Ext JS, but am having trouble getting it to work. I can't seem to get the values form combo boxes correctly.

    Below is a snippet of some of the code.

    Thanks,

    -N


    Code:
    //NOTE:  combobox feedpull is defined elsewhere and has an id of "g1f" set.
    
    
    var graphOne = new Ext.Panel({
            contentEl:'center',
            region: 'center',
            height: '325',
            closable:true,
            autoScroll:true,
            tbar:[
                feedpull,
                '-',
                {
                    id: 'c1',
                    text: 'Update',
                    handler: updateHandler('g1'),
                    tooltip: {text:'This will update the graph with your selection', title:'Update Graph', autoHide:true}
                },
                '-'
            ]
    });
    
    
    function updateHandler(graphId){
        var foo = Ext.query("#g1f");
        alert(foo);
    }

  2. #2

    Default SOLVED

    SOLVED.

    After some digging around, I found the solution.

    When defining the combobox, you have to set:
    Code:
    hiddenName: 'g3date',
    Then, the function can reference the value by:
    Code:
    var nf = Ext.get('g3date').getValue();

Posting Permissions

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