combo.getValue() Does that give you the value you want?
Ralph Dell, GISP GIS Dept. Catawba County, NC -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of François Boussuges Sent: Friday, May 28, 2010 10:05 AM To: [email protected] Subject: [Users] select value of a combobox Hello I have a WFS point and I display style okf this layers in function of diffferent attributes. For display the style in function of my differents attributs I have create a combobox: var medicago_store = new Ext.data.SimpleStore({ fields:['value','text'], data: [ ['SPIRALE_GOUSSE_HORAIRE', '% de spirale horaire'], ['SPIRALE_GOUSSE_ANTIHORAIRE', '% de spirale antihoraire'] ]}); var medicago_box = new Ext.form.ComboBox({ store: medicago_store, displayField:'text', valueField: 'value', region: 'center', emptyText:'Selectionner une variable...', typeAhead: true, selectOnFocus:true, mode: 'local', width: 200, triggerAction: 'all' I want to get the select value of the combobox for use this in a context variable like this: var context = { fillColor: function(feature) { if(feature.cluster) { if ('/combobox.selectedvalue()' = 'value1/'){ sens_hor= parseFloat(0) for(var c = 0; c < feature.cluster.length; c++) sens_hor=sens_hor+parseFloat(feature.cluster[c].attributes.SPIRALE_GOUSSE_HORAIRE) result=sens_hor/feature.cluster.length if(result > 50) return "#990000"; if(result<=50) return "#000099";} But I have tried to extract the select value (or text ) of the combobox with no results? Have you an ideas to insert this value in my function? _______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users _______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
