Indeed, this seems to be an issue. Going to file a bug and see what
that brings us.
A workaround is to move
var XmlHttpRequest;
if( navigator.appName == "Netscape" )
XmlHttpRequest = new XMLHttpRequest();
else
XmlHttpRequest = new ActiveXObject( "MSXML2.XMLHTTP.4.0");
out of the function loadXml() and into the global namespace. That then
works fine.
Adrian Herscu wrote:
Hi all,
Consider the following scenario:
1) A root window hosts a script function that uses the XMLHttpRequest
object to load XML resources. The script function accepts _relative_
URLs, and it works correctly when invoked from the root window.
2) A child window (loaded from some other path) hosts an event handler
that calls the aforementioned script function (through "window.opener"
object). Although the "window.document.baseURI" property of the child
window points to the same URL as its root window, the function call
fails (404 - Object not found).
Tested on Linux/Mozilla1.3 and Win2K/Mozilla1.6a.
Also tested on Win2K/IE6+MSXML4 and it works as expected.
Thanx,
Adrian.
P.S. Test-case attached.