Q:

Open new browser windows in JavaScript without making it active

I have some JavaScript that makes an AJAX call and, if the call fails, opens a new windows (tab in Firefox) and displays the response from the server in that window.  This is very convenient for debugging, because the error is typically from Pylons, so it's a full HTML page. 
The only problem is that the new tab becomes the active tab, which would totally confuse a regular user.  Is there any way to open the tab/window, but not make it active, ie.  keep the current active window? 
My code currently looks like this:
    errorWindow = window.open("", "TCerrorWindow")
    if (errorWindow)
        errorWindow.document.write(xhr.responseText);

A:

You can call errorWindow.blur(); window.focus(); after, forcing the browser to return focus to the previous window. 
The effect you're trying to achieve is commonly called a pop-under window. 

A:

AFAIK this is not possible, as a security measure against pop-under windows.  For debugging purposes you could

use Firebug (with a handy console, where you can output your own log messages from the code)
create a debug layer (div) on your page, where you output error messages in case an error happens

