View Full Version : Hello World Anomoly

15 Jan 2012, 12:23 AM
I was a bit down last week having worked through the Hello World tutorial, got the alert ok, but when I replaced that with the Hello World code, I just got a white screen. The source doesn't show the additional ext... info, simply <body></body>, ie the source is printing the file exactly, (I'm using Safari 5.1.2). This is through the web server http://192.xxx.x.4/~jonnyfolk/HelloWorld/ ( However this morning, just by chance, I took a look at file:///Users/jonnyfolk/Sites/HelloWorld/index.html and it shows Hello World on a light grey background! Perfect! But I'm not happy that it's not showing correctly through the web server - can anyone help?

15 Jan 2012, 2:10 PM
Any JS errors?

15 Jan 2012, 11:41 PM
I attach errors list for perusal...

16 Jan 2012, 12:24 AM
Ok, I see that it's a permissions problem on the web server. I've uploaded the files to my web server online and all is working ok. Thanks for your input.

(BTW I note that body tags are printing:

<body id="ext-gen1003" class=" x-desktop" style="width: 1619px; height: 795px; ">
<form id="history-form" class="x-hide-display" style="display: none;" action="#"><div><input id="undefined" type="hidden"><iframe id="undefined"></iframe></div></form><div id="ext-comp-1004" class=" x-panel x-fullscreen x-landscape" style="width: 1619px; height: 795px; "><div class="x-panel-body" id="ext-gen1004" style="width: 1619px; height: 795px; left: 0px; top: 0px; ">Hello World!</div></div></body>

16 Jan 2012, 5:55 AM
So it's saying the path to your sencha touch js file is incorrect.

16 Jan 2012, 10:33 AM
permissions I think - access forbidden. If I key in the file path it tells me I don't have permission to access. Is there a fail-safe way to change the permissions?

31 Jan 2012, 6:05 PM
I am a newbie programmer trying Sencha - followed Hello World tut, copied/pasted index.html, app.js. Viewing app on my iPhone4 and Chrome (16.0.912.77). I just get the blank white screen too, but in iPhone debug console the abovementioned error msg appears.

Is there a name: ' ' line missing in the .html file sample code? If so, even when I add what I believe is the app name, I still get the same error msg. pls help. TIA


<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Hello World</title>

<script src="lib/touch/sencha-touch.js" type="text/javascript"></script>
<link href="lib/touch/resources/css/sencha-touch.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">

new Ext.Application({
name: 'helloworld',
launch: function() {
new Ext.Panel({
fullscreen: true,
html: 'Hello World!'



31 Jan 2012, 10:18 PM
Hi, I put your code onto a server online and directed resources as follows:

<link rel="stylesheet" href="http://cdn.sencha.io/touch/1.1.0/resources/css/sencha-touch.css" type="text/css" media="screen"/> <script src="http://cdn.sencha.io/touch/1.1.0/sencha-touch.js" type="text/javascript"></script>

And all was well with your code.

I bypassed my permissions problem by setting up my development environment online. If your problems persist you might think that's an option for you too!

1 Feb 2012, 6:44 AM
In the app.js file, I had to add the line 2:

name: 'helloworld',

after the Ext.Application({ line in order to get the Hello World! to appear in the Head. helloworld is also the name of the directory inside of which resides the .html and .js files...

Now it works in both the iPhone4 and Safari. Hope this helps others...

Looking forward to learning Sencha and mobile app programming!