1

I have a template loaded via ajax and template contains the following lines:

<script type="text/javascript">

    alert('11');

</script>

But I don't see neither alert window not any errors. Maybe the thing is in request and response Content-type headers? Mine are following:

Response Headers:

Content-Type    text/html

Request Headers:

Accept  text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Content-Type    application/x-www-form-urlencoded

X-Requested-With    XMLHttpRequest

1 Answer 1

1

The thing is: I loaded that template via contentPane.

The moral: use dojox.layout.ContentPane istead of dijit.layout.ContentPane.

Sign up to request clarification or add additional context in comments.

3 Comments

also of note is the executeScripts attribute of the dojox.layout.ContentPane which tells the ContentPane to go through its content and look for <script> tags to execute.
I didn't touch it, it must be true by default?
it is on by default, I just figured it would be worth noting that the executeScripts property is what controls that behavior.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.