PDA

View Full Version : [DUP-1241]Ext.onReady fires before doc fully loaded



lynxua
19 Oct 2010, 11:16 PM
Ext version tested:

Ext 3.3.0


Adapter used:

ext


Browser versions tested against:

Opera 10
IE8
FF3 (firebug 1.5.4 installed)


Operating System:

Win2003 Std
WinXP Pro


Description:

If you have js scripts in external files loading in <body> section of your html, Ext.onReady fires before these scripts loaded.


Test Case:



<html>
<head>
</head>
<body>
<script type="text/javascript" src="ext-base-debug.js"></script>
<script type="text/javascript" src="ext-all-debug.js"></script>
<script type="text/javascript" src="main.js"></script>
<script type="text/javascript" src="1.js"></script>
<script type="text/javascript" src="2.js"></script>
</body>
</html>
main.js


Ext.onReady(function(){
alert("ready");
});
1.js


alert("1");
2.js


alert("2");

Steps to reproduce the problem:

run html in browser


The result that was expected:

alert("1") in 1.js executed
alert("2") in 2.js executed
alert("ready") in main.js executed


The result that occurs instead:

alert("ready") in main.js executed
alert("1") in 1.js executed
alert("2") in 2.js executed

evant
20 Oct 2010, 12:01 AM
Probably a dupe of: http://www.sencha.com/forum/showthread.php?111826-DUPE-1214-Ext.onReady-getting-fired-multiple-times