PDA

View Full Version : ContentPanel, php script, javascript don't execute



mediastart
11 May 2007, 7:23 AM
Hi all,

I've a little problem with the contentPanel. When I create a contentPanel and set a php file to the load propertie the php file is correctly loaded and the code works correctly too.
But, if in the php file there are javascript, the javascript isn't executed.

example :



<?php

$foo = "toto";

?>

<div id="myDiv">
<script language="javascript" >
alert("I m a javascript code");
</script>

<?php echo $foo; ?>
</div>





If I set this php file to a content panel, the div is create and foo is writte in the div, but the alert of the code javascript don't works.
I tried many things but I can't find a solution, can you help me please ?

Thanks

jsakalos
11 May 2007, 7:27 AM
Have you passed loadScripts?

http://extjs.com/deploy/ext/docs/output/Ext.ContentPanel.html#setContent (http://extjs.com/forum/../deploy/ext/docs/output/Ext.ContentPanel.html#setContent)

mediastart
11 May 2007, 8:02 AM
I've juste one thing to say : Thanks man !!!!!!!! :)