Hi,
setting a form field's message target to an element ID seems to cause problems with MSIE:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<title>Ext JS Form Test 2</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css" media="all">
@import '../resources/css/ext-all.css';
@import '../resources/css/xtheme-gray.css';
</style>
<script type="text/javascript" src="../adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../ext-all.js"></script>
<script type="text/javascript">
Ext.BLANK_IMAGE_URL = '../resources/images/default/s.gif';
Ext.namespace('Ext.Example');
Ext.Example.MsgTarget = function() {
// private variables ------------------------------------------------------
// private functions ------------------------------------------------------
var buildFormPanel = function() {
var simple = new Ext.FormPanel(
{
labelWidth: 75, // label settings here cascade unless overridden
frame:true,
title: 'Simple Form',
bodyStyle:'padding:5px 5px 0',
width: 300,
defaults: {width: 230},
items: [
{
fieldLabel: 'First Name',
xtype: 'textfield',
name: 'first',
allowBlank: false,
blankText: 'Please enter a first name',
msgTarget: 'error-message'
},
{
fieldLabel: 'Last Name',
xtype: 'textfield',
name: 'last',
allowBlank: false,
blankText: 'Please enter a last name',
msgTarget: 'error-message'
},
{
html: '<div id="error-message"></div>'
}
]
}
);
simple.render(Ext.get('main-form'));
};
// public interface -------------------------------------------------------
return {
/** */
init : function() {
Ext.QuickTips.init();
buildFormPanel();
}
}
}();
Ext.EventManager.addListener(window, 'load', Ext.Example.MsgTarget.init);
</script>
</head>
<body>
<div id="main-form"></div>
</body>
</html>
I think it's not MSIE's fault, but line 25517 in ext-all-debug.js
Code:
t.style.display = this.msgDisplay;
I cannot find the property msgDisplay anywhere else in the code. Could this be a bug?
Regards,
Horst