1. No Profile Picture
    Super Moderator
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jun 2009
    Hartford, WI
    Rep Power

    Help building a Drop-down

    Howdy y'all. My goal is to offer a drop-down to select "Personal, Cell, Business", but if someone wishes to have something other than our common 3 options, I wish them to be able to type their answer in the drop-down. The drop-down I found at http://dev.sencha.com/deploy/ext-4.0...rm/combos.html seems to do just that, but iunno how to complete their script as needed. It currently doesn't show on page, n I'm thinking maybe because I haven't edited the script and inserted my 3 options into its store. Sorry, I'm not really a JS guru, but sometimes what customers want, you gotta figure out.

    The example provided by the site was in reference to states, but mine is a drop-down in reference to phone number type.

    <script src="modules/rolodex/combo.js"></script>
    // Define the model for a State
    Ext.regModel('State', {
        fields: [
            {type: 'string', name: 'abbr'},
            {type: 'string', name: 'name'},
            {type: 'string', name: 'slogan'}
    // The data store holding the states
    var store = Ext.create('Ext.data.Store', {
        model: 'State',
        data: states
    // Simple ComboBox using the data store
    var simpleCombo = Ext.create('Ext.form.field.ComboBox', {
        fieldLabel: 'Select a single state',
        renderTo: 'simpleCombo',
        displayField: 'name',
        width: 500,
        labelWidth: 130,
        store: store,
        queryMode: 'local',
        typeAhead: true
    Last edited by Triple_Nothing; February 15th, 2013 at 10:22 AM.

IMN logo majestic logo threadwatch logo seochat tools logo