Skip to main content

Bug Tracker

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 anonymous comment:1

milestone: → 1.0
version: → 1.0b1

Changed August 06, 2006 07:26PM UTC by john comment:2

version: 1.0b11.0

Changed August 15, 2006 05:14AM UTC by john comment:3

milestone: 1.0
version: 1.0

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).

Changed October 01, 2006 02:35PM UTC by joern comment:4

resolution: → invalid
status: newclosed

Can be easily worked around by ommiting the script tags in the response (and using $.getScript() to eval on the fly).