开发者

Dojo: javascript execution in page loaded via ajax

开发者 https://www.devze.com 2023-04-09 11:40 出处:网络
I have a template loaded via ajax and template contains the following lines: <sc开发者_运维问答ript type=\"text/javascript\">

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

<sc开发者_运维问答ript 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


The thing is: I loaded that template via contentPane.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消