Vadim Samokhin
Vadim Samokhin

Reputation: 3446

Dojo: javascript execution in page loaded via ajax

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

Upvotes: 1

Views: 379

Answers (1)

Vadim Samokhin
Vadim Samokhin

Reputation: 3446

The thing is: I loaded that template via contentPane.

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

Upvotes: 1

Related Questions