Side navigation
#16 closed bug (invalid)
Opened June 16, 2006 07:39PM UTC
Closed October 01, 2006 02:35PM UTC
Last modified March 15, 2012 01:33AM UTC
Returning script tag in IE fails
Reported by: | DaveG | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | ajax | Version: | |
Keywords: | script, ajax | Cc: | |
Blocked by: | Blocking: |
Description
IE will not execute javascript with surrounding script tags unless the tags are preceded by a character. Thus returning the following in response to a .load fails to execute in IE:
<script type="text/javascript">
/* <![CDATA[ */
alert("here");
/* ]]> */
</script>
Preceding with some character works:
-
<script type="text/javascript">
/* <![CDATA[ */
alert("here");
/* ]]> */
</script>
Attachments (0)
Change History (4)
Changed July 01, 2006 04:07PM UTC by comment:1
milestone: | → 1.0 |
---|---|
version: | → 1.0b1 |
Changed August 06, 2006 07:26PM UTC by comment:2
version: | 1.0b1 → 1.0 |
---|
Changed August 15, 2006 05:14AM UTC by comment:3
milestone: | 1.0 |
---|---|
version: | 1.0 |
Changed October 01, 2006 02:35PM UTC by comment:4
resolution: | → invalid |
---|---|
status: | new → closed |
Can be easily worked around by ommiting the script tags in the response (and using $.getScript() to eval on the fly).
I don't plan on getting to this for 1.0. The obvious workaround, however, is to simply return just the Javascript, then eval that on the fly - as opposed to injecting it into the DOM (which I assume that you're doing).