id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blocking	blockedby
2709	globalEval works incorrectly in IE6 if the current page has <base href> tag in the HEAD	eych		"That's a weird problem, but I've experienced it on a production site and was able to reproduce it in a simple test (attached to this ticket).

The problematic scenario is this:

1. You have a page (let's call it A) with <base href=""http://domain/path/"" /> in the HEAD. And jQuery loaded as well.

2. On the same page you have a button which if clicked will make an Ajax call to another page (let's call it B) and will insert the response in a div inside page A.

3. This page B has usual HTML content (a bunch of divs) and a JS script block, which has code that should be executed when the Ajax response is added to page A after the Ajax response finishes.

In all browsers this works fine, except IE6. In IE6 I always get ""Invalid argument"" error which points to 

{{{
head.removeChild( script );
}}}

line in globalEval method of jQuery (line 655).

I did a lot of testing an eventually nailed down the problem to the <base href> line in the head of the page. If it's there, I get an error in IE6, if it's not then everything's fine.

Somewhat accidentally I was able to come up with a solution which fixes this weird behavior of IE6:

In globalEval method on line 654 I simply replaced 

{{{
head.appendChild( script );
}}}

with 

{{{
head.insertBefore( script, head.firstChild );
}}}

and the problem vanished. Please look at the attached test case (the paths should be corrected in it in jquery.globalEval.html file and this file should be opened in the browser). 

Hopefully this could be officially fixed in the next jQuery version."	bug	closed	major	1.2.4	core	1.2.3	fixed				
