PDA

View Full Version : Ext.EventObject has no properties



3abbess
3 Jul 2007, 2:09 AM
Hi there, i'm testing contentPanel and some times i get this error : Ext.EventObject has no properties on Firefox and always get it on ie ..

this is my code


Simple = function() {
return {
init : function() {

var northPanel, southPanel, eastPanel, westPanel, centerPanel;

var mainLayout = new Ext.BorderLayout(document.body, {
north: {
split: false,
initialSize: 100,
titlebar: true,
collapsible: true

},
west: {
split: false ,
collapsible: true,
initialSize: 180,
titlebar: true
},
center: {
autoScroll: true
}
});
mainLayout.beginUpdate();
mainLayout.add('north', new Ext.ContentPanel('north-div', {
fitToFrame: true, closable: false
}));
mainLayout.add('west', new Ext.ContentPanel('west-div', {
fitToFrame: true, closable: false
}));
mainLayout.add('center', centerPanel = new Ext.ContentPanel('center-div', {
fitToFrame: true
}));

mainLayout.endUpdate();

centerPanel.load({url: 'content.php', scripts: true, text: "Chargement..."});
centerPanel.refresh();

}
};
}();
Ext.EventManager.onDocumentReady(Simple.init, Simple, true);

jack.slocum
3 Jul 2007, 2:38 AM
Well, since every event in Ext runs though Ext.EventObject, somewhere there is something else wrong.

What are your includes?

3abbess
3 Jul 2007, 2:53 AM
Content.php source code


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Forms</title>
<link rel="stylesheet" type="text/css" href="../ext-1.1-beta2/../ext-1.1-beta2/resources/css/ext-all.css" />
<!-- GC --> <!-- LIBS --> <script type="text/javascript" src="../ext-1.1-beta2/../ext-1.1-beta2/adapter/ext/ext-base.js"></script> <!-- ENDLIBS -->
<script type="text/javascript" src="../ext-1.1-beta2/../ext-1.1-beta2/ext-all.js"></script>
<!-- Common Styles for the examples -->
<link rel="stylesheet" type="text/css" href="../ext-1.1-beta2/examples.css" />
</head>
<body>
<script language="JavaScript" type="text/javascript">
reuForm = new function(){

return {

init: function(){

var formulaire = new Ext.form.Form({
labelAlign: 'top'
});

formulaire.column(
{width:282},
new Ext.form.TextField({
fieldLabel: 'Agence',
name: 'agence',
width: 225
}),
new Ext.form.TextField({
fieldLabel: 'Demandeur',
name: 'demandeur',
width:225
}),

new Ext.form.TextField({
fieldLabel: 'Nom du client',
name: 'client',
width:225
}),

new Ext.form.TextField({
fieldLabel: 'Nombre de personnes',
name: 'nb_persons',
width: 225

})
);

formulaire.column(
{width:272, style:'margin-left:10px', clear:true}, // apply custom css, clear:true means it is the last column
new Ext.form.TextField({
fieldLabel: 'Date de Reu',
name: 'last',
width:225
}),

new Ext.form.TextField({
fieldLabel: 'Email',
name: 'email',
vtype:'email',
width:225
})
);
formulaire.render('form-ct');

}

}
}();

Ext.onReady(reuForm.init, reuForm, true);
</script>

<div style="width:600px;">
<div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>
<div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc">
<h3 style="margin-bottom:5px;">Multi-column and labels top</h3>
<div id="form-ct">

</div>
</div></div></div>
<div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>
</div>
</body>
</html>

tryanDLS
3 Jul 2007, 7:04 AM
There are numerous threads regarding loading content via Ajax - it shouldn't be a full html page (e.g. no HTML/HEAD/BODY tags) and it shouldn't have an onReady b/c the js is eval'd after the container is updated.