PDA

View Full Version : DropDown error in IE8 - no errors in FireFox



jumpow
18 Jul 2013, 1:12 AM
DropDown show error in IE8 and screen is blank.
44930
No errors in FF
44931
Why?
What is wrong in code?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<link rel='stylesheet' type='text/css' href='extjs/resources/css/ext-all.css'>
<script type='text/javascript' src='extjs/ext-all-debug.js'></script>

<script type="text/javascript">
Ext.application(
{
name: 'Statistic',
launch: function()
{
Ext.BLANK_IMAGE_URL='extjs/resources/s.gif';

var lgDBStore = new Ext.data.Store(
{
storeId: 'lgDBStore',
fields: ['Id', 'Name'],
data :
[
{Id: '1', Name: '??????? ??????'},
{Id: '2', Name: '?????'},
]
});

var lgDBList = new Ext.form.ComboBox(
{
triggerAction: 'all',
id: 'lgDBList',
fieldLabel: '??????',
valueField: 'Id',
displayField: 'Name',
store: lgDBStore,
queryMode: 'local',
mode: 'local',
lazyInit: false,
forceSelection: true,
renderTo: 'LoginPanel',
listeners:
{
boxready: function()
{
this.setValue(this.getStore().getAt(0).get(this.valueField),true);
this.fireEvent('select',this);
}
}
});

}
});
</script>
</head>
<body></body>
</html>

-------------------------
Even more...
Code <!DOCTYPE HTML>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<link rel='stylesheet' type='text/css' href='extjs/resources/css/ext-all.css'>
<script type='text/javascript' src='extjs/ext-all-debug.js'></script>

<script type="text/javascript">
Ext.application(
{
name: 'Statistic',
launch: function()
{
Ext.BLANK_IMAGE_URL='extjs/resources/s.gif';

Ext.define('Jumpow.model.DB',
{ extend: 'Ext.data.Model',
fields:
[
{name: 'Id', type: 'string'},
{name: 'Name', type: 'string'},
]
});
}
});
</script>
</head>
<body></body>
</html>

produces error
44932

jumpow
21 Jul 2013, 9:53 AM
I found answer in post
http://www.sencha.com/forum/showthread.php?236877-ExtJS-IE7-8-isModel-Error&p=982519#post982519
In conext
fields:
[
{name: 'Id', type: 'string'},
{name: 'Name', type: 'string'},
]
last comma must be deleted...

evant
21 Jul 2013, 10:18 AM
Yep, IE will treat it as:



['foo', 'bar',] // -> ['foo', 'bar', undefined]