Click here to Skip to main content
15,881,600 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,
Here i have created combo using extjs 5, here my issue is when user selected item from the combo, how can i retrieve selected item value from another js file.

here i am using the below code

C#
Ext.define('doscore.view.panel.Addpanel', {
    extend: 'Ext.container.Container',
    // alias: 'widget.Addpanel',
    xtype: 'app-addpanel',
    cls: 'app-addpanel',
    title: false,
    requires: [
        'Ext.form.field.ComboBox',
        'doscore.view.grids.Watchlist',
        'doscore.view.panel.AddpanelController',
        ],
    layout: 'hbox',
    reference: 'add-panel',
    hidden: true,
    itemId: 'add-panel',
    items: [
    {
        xtype: 'combo',
        emptyText: 'Search for Company',
        // cls: 'qsearch-combo',
        width: '500',
        margin: '20 20 15 20',
        valueField: 'DataText',
        displayField: 'DataId',
        reference: 'source1',
        matchFieldWidth: false,
        listConfig: {
            listeners: {
                beforeshow: function(picker) {
                    picker.minWidth = picker.up('combobox').getSize().width;
                }
            }
        },
            listeners: {
    select: 'itemSelected'
            }

    },
    {
        xtype: 'button',
        text: 'Add Company',
   //     width: 75,
        margin: '20 20 15 10',
        // handler: 'login'

        //listeners: {
        //    select: 'itemSelected'
        //}
    }
    ]

});


when user click any column based on that name create tab and that colum value to be paased to another ext js file.

here js means not javascript it's ext js file
please share any information to me.
Posted
Updated 16-Apr-15 0:57am
v5

1 solution

Essentially, there is such thing as "another file". All includes are done in the HTML <script> tags, in the required order of execution. All code behaves as if it was in one bigger JavaScript file.

Please see:
How to embed script code in other javascript file?[^]

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900