the combobox can be initialized with remote data and drop down in firefox3 beta5,
but cannot be initialized in IE7.
how to correct this problem?
the remote data:
{"findAllLanguageResponse":{"return":[{"deleted":false,"id":1,"name":"中文","enumId":1,"value":"zh_CN"},{"deleted":false,"id":2,"name":"英语","enumId":1,"value":"en_US"}]}}
the html:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>login</title>
<link rel="stylesheet" type="text/css" href="css/ext-all.css" />
<script type="text/javascript" src="js/ext-base.js"></script>
<script type="text/javascript" src="js/ext-all.js"></script>
<script type="text/javascript" src="js/ext-lang-zh_CN.js"></script>
<script type="text/javascript">
Ext.BLANK_IMAGE_URL='images/default/s.gif';
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = 'side';
</script>
<script type="text/javascript">
Ext.onReady(function() {
var languages=new Ext.data.Store({
autoLoad:true,
proxy: new Ext.data.HttpProxy({
method: 'GET',
url: './service/SystemService/findAllLanguage'
}),
reader: new Ext.data.JsonReader(
{root:'findAllLanguageResponse.return',id:'id'},
['value','name','id']
)
});
var loginForm = new Ext.form.FormPanel({
title: 'Welcome Platform Demo',
labelAlign: 'right',
labelWidth: 120,
frame: true,
width: 350,
onSubmit: Ext.emptyFn,
submit: function() {
if(loginForm.form.isValid()){
loginForm.form.getEl().dom.action='/j_spring_security_check';
loginForm.form.getEl().dom.submit();
}
},
items: [
{xtype:'textfield',fieldLabel:'USER ID',id:'j_username',name:'j_username',width:'140',allowBlank:false},
{xtype:'textfield',fieldLabel:'USER PASSWORD',id:'j_password',name:'j_password',inputType:'password',width:'140',allowBlank:false},
{xtype:'combo',fieldLabel:'LANGUAGE',id:'locale',name:'locale',editable:false,store:languages,displayField:'name',valueField:'value',triggerAction: 'all',allowBlank:false}
],
buttons: [
{text:'Login',type:'button',id:'login',handler:function(){loginForm.form.submit()}},
{text:'Reset',type:'reset',id:'clear',handler:function(){loginForm.form.reset()}}
],
method: 'POST'
});
loginForm.render('login-div');
});
</script>
</head>
<body>
<div id="login-div" style="margin: 15% 30% 15% 30%" align="center"/>
</body>
</html>