POLALA.COM
welcome to my space
X
Web Design | Video Games | RVs | Religion | Management | Supplements and Vitamins | Software | Basketball | Related articles
Welcome to:polala.com
Search:  
NAVIGATION - HOME

[SOLVED] value in field from combobox

Published by: rose 2009-01-09

  • Hi,
    last time i think about something lik this. I have combobox with values from store ('id', 'values') what method use to set 'id' in textfield and 'values' in combo bo select this value


  • hmm...i wrote something wrong...a would like to do that if i choose from the combobox eg. value_1 in the textfield appears id_1 etc. i would like use it to insert two values to the grid from the combo


  • ok first step is done


    {
    fieldLabel: 'abbr',
    name: 'abbr',
    id:'combo-city',
    width:190
    },

    new Ext.form.ComboBox({
    fieldLabel: 'State',
    hiddenName:'state',
    store: new Ext.data.SimpleStore({
    fields: ['abbr', 'state'],
    data : Ext.exampledata.states // from states.js
    }),
    valueField:'abbr',
    displayField:'state',
    typeAhead: true,
    mode: 'local',
    How refresh combo box content? [Archive] - SYTELINE FORUMS::
    I want that this combo change his content when i change the value of another combo, nothing happen with the content of the field's combo box.
    http://www.syteline7.com/archive/index.php?t-253.html
    HOME

    listeners:{select:{fn:function(combo, value) {
    var comboCity = Ext.getCmp('combo-city');
    var val1 = combo.getValue();
    comboCity.setValue(val1);
    }
    },
    triggerAction: 'all',
    emptyText:'Select a state...',
    selectOnFocus:true,
    width:190
    })



    here is my code. in combo i have states name and in the textfield are short name of state after select. However when i send this form to the DB values from this two field will be the same (value: 'abbr'). I would like do sth different. values of this two forms willbe different 'abbr' and 'states'


  • Use:

    {
    fieldLabel: 'abbr',
    name: 'abbr',
    id: 'abbrField',
    width: 190,
    listeners: {
    change: function(field, value) {
    var stateField = Ext.getCmp('stateField');
    var record = state.store.getAt(value);
    stateField.setValue(record.get('state'));
    fieldEditor : comboBox which options depends on the value of ::
    1 post - Last post: Jul 16, 2008vendor.cfm?service=XXXXX : XXXXX is the value of service field of i wrote the this code and i get the combobox displayed at the title of
    http://bdn.backbase.com/node/5171
    HOME
    OL2000: How to Populate a List Box or Combo Box::
    There are a variety of ways to populate a list box or combo box on an Outlook form. Leave the Possible Values field blank, and then click OK.
    http://support.microsoft.com/kb/232341
    HOME
    }
    }
    },{
    xtype: 'combo',
    id: 'stateField',
    fieldLabel: 'State',
    name:'state',
    store: new Ext.data.SimpleStore({
    id: 0,
    fields: ['abbr', 'state'],
    data : Ext.exampledata.states
    }),
    displayField:'state',
    typeAhead: true,
    mode: 'local',
    listeners: {
    select: function(combo, record) {
    Value not valid for field in Combobox - Access World Forums::
    I had the same problem but solved it by disabling the allow filter option of the form. "The value you entered isn't valid for this Field" Combobox
    http://www.access-programmers.co.uk/forums/showthread.php?p=781549
    HOME
    var abbrField = Ext.getCmp('abbrField');
    abbrField.setValue(record.get('abbr'));
    }
    },
    triggerAction: 'all',
    emptyText: 'Select a state...',
    selectOnFocus: true,
    width: 190
    }


  • hmm...in the same time i made sth like this:


    {
    fieldLabel: 'abbr',
    name: 'abbr',
    id:'combo-city',
    width:190
    },

    new Ext.form.ComboBox({
    fieldLabel: 'State',
    hiddenName:'state',
    store: new Ext.data.SimpleStore({
    fields: ['abbr', 'state'],
    data : Ext.exampledata.states // from states.js
    }),
    valueField:'abbr',
    id:'state',
    displayField:'state',
    typeAhead: true,
    mode: 'local',

    listeners:{select:{fn:function(combo, value) {
    var comboCity = Ext.getCmp('combo-city');
    var val1 = combo.getValue();
    comboCity.setValue(val1);
    }
    },
    triggerAction: 'all',
    emptyText:'Select a state...',
    selectOnFocus:true,
    width:190
    })




    and works good ;)

    Condor, thanks for help and move to good road


  • Use:

    var cb = new Ext.form.ComboBox({
    store: myStore,
    displayField: 'values',
    valueField: 'id',
    hiddenName: 'id',
    ...
    });
    myStore.load({...});
    cb.setValue(1);

    (or id and values reversed, you're not clear enough on that)


  • In the select eventhandler of the combobox get the current record and set the value of the textfield.





  • Where's The Advantage In Windows Genuine Advantage?
    Stocks Bounce After S&P Joins Bear Market

    PRINT Add to favorites
  • selecting your havanese puppy
  • learn what s dog training all about
  • bad german shepherd breeders and puppy mills
  • the personality of siberian huskies
  • socialization training with puppies
  • good german shepherd breeders
  • dog skin problems watch what they eat
  • the coonhound dog breed
  • giant dog breeds
  • yorkshire terrier information breed history
  • road trip with your jack russell terrier
  • what constitutes a fake rottweiler breeder
  • rottweiler breeder questions
  • siberian husky dogs are fun to own

  • make dog training fun
  • the bichon frise as a family pet
  • bichon frise a late arrival in france
  • raising beagle puppies is an experience
  • finding pomeranian breeders where to start
  • dog training done correctly can turn your dog into an amazing dog
  • travel dangers in jack russell dogs
  • dog illnesses veterinarian help
  • chihuahua breeders to avoid
  • personality of the shar pei
  • choosing havanese puppies as your child’s first pets
  • pet stores the honest chihuahua breeder s nightmare
  • the hunt in finding a shih tzu puppy for sale
  • buying from a pomeranian breeder
  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about [SOLVED] value in field from combobox , Please add it free.
     Homepage | Add to favorites | Contact us | Exchange links | LOGIN | Site map | 
    Copyright© 2008 polala.com        Site made:CFZ