PDA

View Full Version : ComboBox issue on IE



Kephy
12 Jun 2009, 4:49 AM
Hi,

I'm new on ExtJS, and I'm just trying to apply the combo box example to my application.

My problem is that a code that works fine on FF 3 doesn't work on IE7.

Here it is :



<script language="JavaScript">
Ext.onReady(function(){

Ext.namespace('Ext.exampledata');

Ext.exampledata.states = [
['AL', 'Alabama', 'The Heart of Dixie'],
['AK', 'Alaska', 'The Land of the Midnight Sun'],
[...]
];

// simple array store
var store = new Ext.data.SimpleStore({
fields: ['abbr', 'state'],
data : Ext.exampledata.states
});


var combo = new Ext.form.ComboBox({
store: store,
displayField:'state',
valueField: 'abbr',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText:'Select a state...',
selectOnFocus:true,
applyTo: 'waffle'

});


});
</script>

and the page where the script is placed :


<div class="main_container_body">
<div class="tab2">
<div>
<input type="text" id="waffle" size="20"/>
</div>
[...]
</div>
</div>


The body and other tags are included by Tiles, the page is well-formed

When accessing that page with IE, i get the error : 'this.el.dom' is null or not an object

If I try using renderTo instead of applyTo with a div names "waffle", I get a similar error about the dom at another line.
I'm not able to debug this correctly as there is no error with FF.

I've been trying to solve this issue for several hours, i've got no clue, could you please save me ?

Thanks

Kephy
12 Jun 2009, 6:42 AM
I have the same problem with ExtJS 2.2.1, maybe I should post the question in the ExtJS 2 help part ?

Edit : I've found a solution. It seems Ext.onReady doesn't work correctly, at least in my case.
When I use another method (Event.onDomReady, provided by another framework) to execute my JS code instead on Ext.onReady, everything works correctly.