PDA

View Full Version : Window loader: page load but javascript function does not work



philance
1 Apr 2012, 7:48 AM
Bros,

I have a function call to create new Windows


newwin = desktop.createWindow({
id : 'newjl_'+customerid+'_'+joblogtypeid,
title : 'New Job Log',
width : 640,
height : 480,
loader : {
url : weburl+'/joblogs/joblogadd/customerid/'+customerid+'/joblogtypeid/'+joblogtypeid,
loadMask : true,
autoLoad : true, // important
renderer : 'html' // this is also the default option, other options are data | component
},
iconCls : 'joblogadd',
animCollapse : false,
constrainHeader : true
});
newwin.show();
return newwin;

New Window open but the page only load the html part, not any of the javascript function:


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
function create(){
Ext.get('jlogaddcontent').update('test');
}
</script>
</head>

<body onload="create();" style="padding:0; margin:0;" scroll="no">
<div id='jlogaddcontent'>testdaf</div>
</body>
</html>

Please help.

mitchellsimoens
2 Apr 2012, 8:20 AM
Try setting scripts : true

philance
2 Apr 2012, 9:21 AM
Still the same :(. I have no choice but to use iframe ... dun really want to use it actually :-s.