Except that it will not work unless the two documents are from the same domain - for security reasons.
By the way, [font=monospace]document.location.href[/font] is problematic. In JavaScript 1.0 [font=monospace]document.location[/font] was was simply a string. In JavaScript 1.1 it was depricated in favour of the object [font=monospace]window.location[/font], [font=monospace]window.location.href[/font] being one of the properties of that object. Now to keep older web pages running, JavaScript 1.1 made [font=monospace]document.location[/font] a synonym of the object [font=monospace]window.location[/font]. This works because all objects in JavaScript have a [font=monospace]toString()[/font] method that is called when you want the object to be a string and because [font=monospace]window.location[/font] has the unique property that you can assign a string to it. All this is to say that [font=monospace]document.location.href[/font] sends a chill down the spine of JavaScript pedants and, more importantly, will not work on JavaScript 1.0 browsers. It is also possible that future browsers will no longer support [font=monospace]document.location[/font].[/font]