PDA

View Full Version : [SOLVED]Javascript not being executed in Ext JS 3.0



Waldo
1 Jul 2009, 7:18 AM
I have recently upgraded my site to Ext JS 3.0 RC2. Although the migration went relatively smoothly, there is one problem I haven't been able to fix or find related issues in the forums.


When I point to version 2.x (in index.html below), scripts in index2.html are executed when loaded into the "myDiv" container. However, when pointed to version 3.0, the javascript is not executed.


Has this functionality been removed from version 3.0 or is this a bug in the new version?


index.html




<html>
<head>
<title></title>
<script type="text/javascript" src="/ext3.0/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="/ext3.0/ext-all.js"></script>

</head>



<body>
<div id="myDiv">logged out</div>
<input type="button" onclick="login();" value="Submit" />

<script type="text/javascript">
function login(){
Ext.get("myDiv").load({
url: "index2.html",
scripts: true,
text: "Loading..."
});
}
</script>

</body>

</html>



index2.html





logged in
<script type="text/javascript">alert('test');</script>

tryanDLS
1 Jul 2009, 7:40 AM
Your code works fine for me in RC2. Are you sure it's finding the file? No 404s in Firebug?

Animal
1 Jul 2009, 7:45 AM
I think there was a bug which prevented script from being executed (Possibly browser dependent?). Evan fixed it in SVN a while back.

Hang on until RC3, and I think it will work.

evant
1 Jul 2009, 7:46 AM
Yeah, it was a bug affecting IE. From all the testing I did I couldn't reproduce the issue after applying the patch.

tryanDLS
1 Jul 2009, 8:10 AM
Ok, thought this was a FF issue. Confirmed broken in IE6 in RC2, fixed in SVN so will be in RC2.1 later today.

Waldo
1 Jul 2009, 11:17 PM
Thanks guys. It's working in 3.0 RC3 and I have tested in the following browsers:


IE 6.0.2
IE 7.0.5
IE 8.0.6
FF 2.0.0.9
Google Chrome 2.0.172.33
Just to respond to the posts. In 3.0 RC2, the problem was not solved for the browsers above, except for Google Chrome.