Bug Tracker

Opened 17 years ago

Closed 16 years ago

Last modified 11 years ago

#16 closed bug (invalid)

Returning script tag in IE fails

Reported by: DaveG Owned by:
Priority: minor Milestone:
Component: ajax Version:
Keywords: script, ajax Cc:
Blocked by: Blocking:


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[ */


/* ]]> */ </script>

Preceding with some character works: - <script type="text/javascript"> /* <![CDATA[ */


/* ]]> */ </script>

Change History (4)

comment:1 Changed 17 years ago by anonymous

Milestone: 1.0
Version: 1.0b1

comment:2 Changed 17 years ago by john

Version: 1.0b11.0

comment:3 Changed 17 years ago by john

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

comment:4 Changed 16 years ago by joern

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

Note: See TracTickets for help on using tickets.