Erreur js
pac1919
Messages postés
5
Statut
Membre
-
ThEBiShOp Messages postés 9307 Statut Contributeur -
ThEBiShOp Messages postés 9307 Statut Contributeur -
Bonjour,
voici le code de mes 2 ages
index.html:
<html>
<head>
<title>Account Manager</title>
<link rel="stylesheet" type="text/css" href="ext-4.0.7-gpl/ext-4.0.7-gpl/resources/css/ext-all.css">
<script type="text/javascript" src="ext-4.0.7-gpl/ext-4.0.7-gpl/ext-debug.js"></script>
<script type="text/javascript" src="file.js"></script>
</head>
<body>
</body>
</html>
**************************************
file.js:
var childPanel1 = Ext.create('Ext.panel.Panel', {
title: 'Child Panel 1',
html: 'A Panel'
});
var childPanel2 = Ext.create('Ext.panel.Panel', {
title: 'Child Panel 2',
html: 'Another Panel'
});
Ext.create('Ext.container.Viewport', {
items: [ childPanel1, childPanel2 ]
});
Ext.create('Ext.tab.Panel', {
renderTo: Ext.getBody(),
height: 100,
width: 200,
items: [
{
// Explicitly define the xtype of this Component configuration.
// This tells the Container (the tab panel in this case)
// to instantiate a Ext.panel.Panel when it deems necessary
xtype: 'panel',
title: 'Tab One',
html: 'The first tab',
listeners: {
render: function() {
Ext.MessageBox.alert('Rendered One', 'Tab One was rendered.');
}
}
},
{
// this component configuration does not have an xtype since 'panel' is the default
// xtype for all Component configurations in a Container
title: 'Tab Two',
html: 'The second tab',
listeners: {
render: function() {
Ext.MessageBox.alert('Rendered One', 'Tab Two was rendered.');
}
}
}
]
});
**************************
ça m'affiche une page blanche
merci pour votre aide
voici le code de mes 2 ages
index.html:
<html>
<head>
<title>Account Manager</title>
<link rel="stylesheet" type="text/css" href="ext-4.0.7-gpl/ext-4.0.7-gpl/resources/css/ext-all.css">
<script type="text/javascript" src="ext-4.0.7-gpl/ext-4.0.7-gpl/ext-debug.js"></script>
<script type="text/javascript" src="file.js"></script>
</head>
<body>
</body>
</html>
**************************************
file.js:
var childPanel1 = Ext.create('Ext.panel.Panel', {
title: 'Child Panel 1',
html: 'A Panel'
});
var childPanel2 = Ext.create('Ext.panel.Panel', {
title: 'Child Panel 2',
html: 'Another Panel'
});
Ext.create('Ext.container.Viewport', {
items: [ childPanel1, childPanel2 ]
});
Ext.create('Ext.tab.Panel', {
renderTo: Ext.getBody(),
height: 100,
width: 200,
items: [
{
// Explicitly define the xtype of this Component configuration.
// This tells the Container (the tab panel in this case)
// to instantiate a Ext.panel.Panel when it deems necessary
xtype: 'panel',
title: 'Tab One',
html: 'The first tab',
listeners: {
render: function() {
Ext.MessageBox.alert('Rendered One', 'Tab One was rendered.');
}
}
},
{
// this component configuration does not have an xtype since 'panel' is the default
// xtype for all Component configurations in a Container
title: 'Tab Two',
html: 'The second tab',
listeners: {
render: function() {
Ext.MessageBox.alert('Rendered One', 'Tab Two was rendered.');
}
}
}
]
});
**************************
ça m'affiche une page blanche
merci pour votre aide
2 réponses
Hello, j'ai pas encore regarder ton code mais pourrais-tu utiliser les balises < code > autour de tes deux copié collé ? ça serait beaucoup plus agréable à l'oeil :D
Pour ta page HTML : < code html >< /code >
Pour ta page JS : < code js>< /code >
(sans les espaces après les < et avant les >
Merci à toi
A+
Seezer
Pour ta page HTML : < code html >< /code >
Pour ta page JS : < code js>< /code >
(sans les espaces après les < et avant les >
Merci à toi
A+
Seezer