PDA

View Full Version : executing reveiced scripts



jayanuaria
8 Nov 2007, 1:16 AM
Hi. im new to ext. i just want to ask.. how can i execute scripts received from the server..
for example i have..


var container = Ext.get("container");
container .load({
url: url,
params: param,
text: "Loading...",
method: "GET"
});


and the server returns
"
<script type='text/javascript'>
alert('Hi im new to ext.');
</script>
"

how can it be executed?

jayanuaria
8 Nov 2007, 11:03 PM
I found the solution.. Thanks..

fay
9 Nov 2007, 1:18 AM
It's always nice to post the solution - for others that might be wondering the same thing... Was it eval()??

evant
9 Nov 2007, 2:22 AM
Fairly sure it would be missing a loadScripts in the config options.

ejetorix
9 Nov 2007, 2:52 AM
So the finally winner way is........

jayanuaria
28 Nov 2007, 2:10 AM
You can use eval() but ext does support this feature by passing scripts: true in the config.