dojo.xhrGet(): how to execute inline javascript?

1.5k Views Asked by At

simple question: How do I execute inline javascript in a HTML page snippet loaded with dojo.xhrGet()?
Being new to dojo I'm a bit confused this doesn't just work like in JQuery ...
Can anyone help??
Thanks,
thomas

1

There are 1 best solutions below

5
On

We need more details! If you don't provide enough info you'll never get the right answer.

Anyway, if the HTML snippet is loaded inside a ContentPane, use a dojox.layout.ContentPane (is an extension to dijit.layout.ContentPane providing script execution).Or you could use one of the script tags that dojo accept. E.g:

<div dojoType=...>
 <script type="dojo/connect" event="functionToConnectTo">
    //javascript here
 </script>
</div>

More valuable information about script tags on dojo parser reference.