RobbyRacoon
04-23-2007, 12:56 PM
Well, I can confirm it :) The Prototype adapter is borked in 1.0
Using the BorderLayout (I was using /ext-1.0/examples/layout/complex.html to test with), loading a ContentPanel dynamically with something like this:
Ext.Element.get(id).getUpdateManager().update({url :"/ext-1.0/examples/layout/test.html", scripts:true});
(or any of the other methods I've tried) to load a page that looks like this:
<div class="navContent">
<p onclick="alert('wth! Inline script works fine...');">Now is the time for all good men to come to the aid of their country</p>
<script type='text/javascript'>
alert( "...but script in a <Script> tag does not run" );
</script>
</div>
Using the prototype adapter the script inside the < script> block will not run, but making no other changes to complex.html except for switching the prototype adapter for the YUI adapter the script inside the < script> block will run when loaded.
Here are the includes I am using for the adapters, paths verified 1,000 times and known to be good
yui
<script type="text/javascript" src="/ext-1.0/adapter/yui/yui-utilities.js"></script>
<script type="text/javascript" src="/ext-1.0/adapter/yui/ext-yui-adapter.js"></script>
prototype
<script type="text/javascript" src="/ext-1.0/adapter/prototype/prototype.js"></script>
<script type="text/javascript" src="/ext-1.0/adapter/prototype/scriptaculous.js?load=effects"></script><!--copied-->
<script type="text/javascript" src="/ext-1.0/adapter/prototype/ext-prototype-adapter.js"></script>
.
Using the BorderLayout (I was using /ext-1.0/examples/layout/complex.html to test with), loading a ContentPanel dynamically with something like this:
Ext.Element.get(id).getUpdateManager().update({url :"/ext-1.0/examples/layout/test.html", scripts:true});
(or any of the other methods I've tried) to load a page that looks like this:
<div class="navContent">
<p onclick="alert('wth! Inline script works fine...');">Now is the time for all good men to come to the aid of their country</p>
<script type='text/javascript'>
alert( "...but script in a <Script> tag does not run" );
</script>
</div>
Using the prototype adapter the script inside the < script> block will not run, but making no other changes to complex.html except for switching the prototype adapter for the YUI adapter the script inside the < script> block will run when loaded.
Here are the includes I am using for the adapters, paths verified 1,000 times and known to be good
yui
<script type="text/javascript" src="/ext-1.0/adapter/yui/yui-utilities.js"></script>
<script type="text/javascript" src="/ext-1.0/adapter/yui/ext-yui-adapter.js"></script>
prototype
<script type="text/javascript" src="/ext-1.0/adapter/prototype/prototype.js"></script>
<script type="text/javascript" src="/ext-1.0/adapter/prototype/scriptaculous.js?load=effects"></script><!--copied-->
<script type="text/javascript" src="/ext-1.0/adapter/prototype/ext-prototype-adapter.js"></script>
.