Skip to main content

Bug Tracker

Side navigation

#3705 closed bug (duplicate)

Opened December 10, 2008 12:00PM UTC

Closed September 25, 2009 01:17AM UTC

AJAX IE6 with quirks mode runtime error

Reported by: zardoz Owned by: flesler
Priority: major Milestone: 1.3
Component: ajax Version: 1.2.6
Keywords: Cc: zardoz
Blocked by: Blocking:
Description

If you are in IE6 and do an ajax get to insert

some snippet with a script/style tag. The new tag

is inserted inside the <base> not the <head> causing

a runtime error when the ajax call tries to remove the <script> later.

Here's the HTML we had

--- blank line here ignores the DOCTYPE an puts IE in quirks mode ---

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http:www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html

xmlns= "http://www.w3.org/1999/xhtml"

xml:lang= "en"

lang= "en"><head><base target="_top"/>

And here's the offending line of jquery.js

ajax: function( s ) {

...

if( head )

head.removeChild( script );

...

Seems like the change below is more robust and guaranteed to work for any node whatsoever.

if( head && script)

script.parentNode.removeChild( script );

There are a few other places in jquery with does this same kind of removal.

Attachments (0)
Change History (3)

Changed December 11, 2008 12:40PM UTC by flesler comment:1

cc: → zardoz
owner: → flesler
status: newassigned

Changed February 15, 2009 06:55PM UTC by dmethvin comment:2

See also #3283.

Changed September 25, 2009 01:17AM UTC by dmethvin comment:3

resolution: → duplicate
status: assignedclosed

Dup of #4378.