PDA

View Full Version : Error with IE and combobox



springrider
25 Oct 2010, 7:24 PM
Good morning

I developped a small application with a combobox populated by an XML:


var store = new Ext.data.XmlStore({
autoLoad: true,
proxy: new Ext.data.HttpProxy({ url: 'maps-tree.xml', method: 'GET' }),
record: 'project',
fields: [

{ name: 'projectName', type: 'string', mapping:'@title'},
{ name: 'projectID', type: 'string', mapping:'@number'}
]

});

var combo = new Ext.form.ComboBox({
mode: 'local',
store: store,
displayField:'projectName',
valueField:'projectID',
region:'north',
typeAhead: true,
forceSelection: true,
triggerAction: 'all',
emptyText:'Select a project...',
selectOnFocus:true

});

Everything is working nicely with all the browsers except IE. When i click on the combobox, i have not value but an error telling me that 'argument is not valid in ext-all-debug.js line 2349 character 17'.

Any ideas on how to solve this?

Thanks

Sylvain

springrider
25 Oct 2010, 8:48 PM
OK i found out by playing with the combobox examples that, the combobox is correctly populated when put outside of my panel using:

<div>
<input type="text" id="local-states" size="20"/>
</div>with my combobox updated as follow:



var combo = new Ext.form.ComboBox({
...
emptyText:'Select THE project...',
applyTo: 'local-states',
selectOnFocus:true

});It means that the combobox does not appreciate being put in a panel like that:


var panel= new Ext.Panel({
renderTo: 'tabsMap',
title: 'My application',
layout: 'border',
width: 650,
height: 450,
items: [tabs, combo]});Any way to avoid that and being able to include a combobox within a panel?

Thanks

Sylvain

springrider
25 Oct 2010, 9:36 PM
OK i found out, feel a bit ashamed.

I had to include the combo into the toolbar of the panel to make it working in IE:


= new Ext.FormPanel({
renderTo: 'tabsMap',
title: 'Application ',
layout: 'border',
width: 650,
height: 450,
tbar: [
combo
],
items: [tabs]});