PDA

View Full Version : Cannot populate a ComboBox on IE



Yann
10 May 2007, 5:16 PM
Hi all,
Can someone can tell me why this work on Firefox and not on IE7?
Thank in advance,
Yann
************************************************************

<html>
<head>
<link rel="stylesheet" type="text/css" href="/resources/css/ext-all.css" />
<script type="text/javascript" src="/adapter/yui/yui-utilities.js"></script>
<script type="text/javascript" src="/adapter/yui/ext-yui-adapter.js"></script>
<script type="text/javascript" src="/ext-all.js"></script>
<script>
Ext.onReady(function(){
var CountryList;
var ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({url: '/WS/GetAllCountries.aspx'}),
reader: new Ext.data.XmlReader({
record: 'Table',
id: 'CountryCode'
}, [
'Country'
])
});

var CountryList = new Ext.form.ComboBox({
displayField:'Country',
valueField: 'Country',
store: ds,
triggerAction: 'all',
fieldLabel: 'Country',
id: 'Country',
forceSelection: true,
name: 'Country',
width:250,
allowBlank:false,
editable: false,
mode: 'remote'
})
CountryList.applyTo('MyTXT');

});
</script>
</head>
<body>
<input type="text" id="MyTXT" name="MyTXT" />
</body>
</html>**************************************************************

<?xml version="1.0" encoding="UTF-8" ?>
<NewDataSet>
<Table>
<CountryCode>AF</CountryCode>
<Country>Afghanistan</Country>
</Table>
<Table>
<CountryCode>AL</CountryCode>
<Country>Albania</Country>
</Table>
<Table>
<CountryCode>DZ</CountryCode>
<Country>Algeria</Country>
</Table>
<Table>
<CountryCode>AS</CountryCode>
<Country>American Samoa</Country>
</Table>
<Table>
<CountryCode>AD</CountryCode>
<Country>Andorra</Country>
</Table>
</NewDataSet>

jsakalos
10 May 2007, 5:32 PM
What content type does the server return when responding with xml data? There are several threads on content-type; search for more info.

Yann
10 May 2007, 5:47 PM
Thanks jsakalos,

By double checking to answer you, I saw that I did a mispeling on it..... now it works..... I do use "application/xml" I just mispeled it.

Yann