PDA

View Full Version : "autoLoad" issue in Panel component



jeff77
24 Jun 2010, 5:08 PM
Hi.
I`m trying to use "autoLoad" in my panel.
It has parameters and it works as well.
But I can not use functions of Ext Js or any javascript sources in loaded page.
Isn`t it possible to use javascript in loaded page?
That`s my part of source. Thanks

----------main page
new Ext.Panel({
height : 1000,
items : [{
height : 1000,
title : 'it`s the parent page',
autoLoad : {
url : '/root/loaded_page.jsp',
params : {
dtoday : '<%=dtoday%>',
today1 : '<%=today1%>',
}
}
}]
})
---------------loaded_page
......
<div id="first" style="position: relative; width: 100%; height: 100%; aborder: #B5CDE4 0px solid;">
...................................
</div>
<script language="JavaScript" type="text/javascript">
function aa(){
alert("2");
alert("24r3224");
}
Ext.onReady(function(){
var mainPanel = new Ext.Panel({
height : 1000,
renderTo : Ext.get('gridtest'),
items : [{
height : 1000,
title : 'sdfs'
}]
})
var main_viewport = new Ext.Viewport({
height : 1000,
html : 'show me!!',
items : [ mainPanel ]
}).show();
});
.........................
</script>

27 Jun 2010, 10:07 AM
add scripts:true to your autoLoad config.