PDA

View Full Version : Errors



borden0108
3 Jun 2011, 4:18 PM
Hey,

Have a bit of a newbie error. I get an "Ext is undifined" error when i run my code.

The Html file looks like this:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" ref="js/sencha-touch-1.0.1/resources/css/sencha-touch.css" type="text/css">
<script type="text/javascript" src="js/sencha-touch-1.0.1/sencha-touch-debug.js"></script>
<script type='text/javascript' src='js/app.js'></script>
</head>
<body>
</body>
<html>

and the js file "app.js" looks like this

var myPanel = new Ext.Panel({
floating: true,
modal: true,
centered: true,
scroll: 'vertical',
width: 300,
height: 200,
styleHtmlContent: true,
html: "<h2>Hello Readers</h2>"
});

Thanks
Matt

jmclem
4 Jun 2011, 5:34 AM
Hi,

can you double check the path to the sencha-touch-debug.js file?

Jean-Marie.

jmclem
4 Jun 2011, 5:37 AM
Hi again,

also check the syntax of your HTML code: <link> needs a href, not a ref. Your closing tag should be </html>, and not <html>. And your <head> section requires a <title> to be conform.

Jean-Marie.

caballeroantonio
4 Jun 2011, 7:26 AM
needed call to show() , with onReady is better.


<script type="text/javascript" >
Ext.setup({
onReady: function() {
var myPanel = new Ext.Panel({
floating: true,
modal: true,
centered: true,
scroll: 'vertical',
width: 300,
height: 200,
styleHtmlContent: true,
html: "<h2>Hello Readers</h2>"
});
myPanel.show();
}
});
</script>

borden0108
4 Jun 2011, 4:23 PM
the problem was that i was using a " instead of a ' and this sent it into denial. Thanks for all your help.:):):)