Access to [window]s from other domains are prohibited by the Same Origin Policy, the location property is however writable.
In this case, you need to either use document.domain = foo, or in some other way pass the expected url to a.abc.com, for instance using #http://b.abc.com/ or ?b=http://b.abc.com/ so that you don't need to read the property.
In the first case, note that this might create problems with scripts that use iframes to post/upload data to the server asynchronously as these will no longer have access to the iframes content after setting document.domain.
If your environment is cross-domain then you should probably look into easyXDM as well. This is a easy-to-use library that lets you communicate across domain boundaries, event with RPC calls. You can try one of the examples here, this enables cross-domain XHR.
Read more about the example at http://easyxdm.net/wp/2010/03/17/cross-domain-ajax/