PDA

View Full Version : Help me



pav-pas
12 Jul 2011, 6:44 PM
How do preloader for example http://dev.sencha.com/deploy/ext-3.4.0/examples/desktop/desktop.html

Header html
--------------------------------------------------------------------------------------
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div id="loading-mask"></div>
<div id="loading">
<div class="loading-indicator"><img src="/css/images/loading/extanim32.gif" width="32" height="32" style="margin-right:8px;"/><div id="textload">Loading...</div></div>
</div>
...................

JS: App.js
----------------------------------------------------------------------------------------
initApp : function(){
setTimeout(function(){
Ext.get('loading').remove();
Ext.get('loading-mask').fadeOut({remove:true});
}, 250);

this.startConfig = this.startConfig || this.getStartConfig();

this.desktop = new Ext.Desktop(this);

this.launcher = this.desktop.taskbar.startMenu;


If RUN:
Error:
el is null
[????????? ?? ???? ??????] if (el.insertAdjacentHTML) {

skirtle
16 Jul 2011, 2:54 AM
Please use code tags for posting code (# or <> button in the editor toolbar). You should also ensure that your posts have a meaningful title, not just 'Help me'.

Your HTML is very broken. Put your DIVs in the body, not the head.

If that doesn't help, just use a debugger (Firebug or Chrome Developer Tools are good) to inspect the stacktrace and figure out what el should have been when it was null.