[ 
https://issues.apache.org/struts/browse/WW-2501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44398#action_44398
 ] 

Jeromy Evans commented on WW-2501:
----------------------------------

Also, doesn't your target code mean you've nested two <sx:head> tags?
one at the top of the page and one in the fragment inserted into the page.  I'm 
sure that's not going to work.

The issue here is that browsers do not execute scripts inserted into a page via 
innerHTML (some do, some don't). If enabled, dojo parses your fragment, 
EXTRACT's the scripts, inserts the remaining HTML into the DOM and executes 
(eval's) the scripts. Hence, the inline scripts may not be visible in the DOM 
but may have been executed.

If you remove the nested head tags, is the alert shown?

There is potential for some inline scripts to not work in this scenario. eg. if 
it declares a function but doesn't add the function to the DOM.


> No JavaScript in sx:div
> -----------------------
>
>                 Key: WW-2501
>                 URL: https://issues.apache.org/struts/browse/WW-2501
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Dojo Tags
>    Affects Versions: 2.1.0
>            Reporter: Alberto José Rodríguez Rodríguez
>            Priority: Critical
>             Fix For: 2.1.3
>
>
> Time ago I noticed that javascript were removed in the pages linked by 
> <sx:div ..>.
> Parameters executeScripts and separateScripts don't solve the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to