I want to call a web service and use it in combox for search. Here is the function that i used to call my service web:

var xmlhttp = new XMLHttpRequest();
var url = "";
var params = JSON.stringify({
xmlhttp.open("POST", url, true);

xmlhttp.setRequestHeader("Content-type", "application/json");

xmlhttp. önreadystatechange = function() {
        if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {

I created the ComboBox using the GeoExt bibliography:

var promosCombo = new Ext.form.ComboBox({   
 id : 'promosCombo',
 triggerAction : 'all',
 emptyText : "Ville, Avenue, Rue...",
 editable : false,
 store : promosStore,
 mode : 'local',
 valueField : 'value',
 displayField : 'display',

here is my store:

var promosStore = new Ext.data.JsonStore({
 url : '',
 fields : ['display', 'value'],
 root : 'rows',
 autoLoad : true

What i want exactly is when i start to tape in my ComboBox the list of the city appear so i can choose the city.

closed as unclear what you're asking by PolyGeo Oct 6 '18 at 5:34

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • a3ni what do you mean? – Hamri Said Mar 21 '17 at 19:09