document.location is the same as document.URL but is deprecated - you would need window.location.
In this instance I think a bit of tag soup is better than a popup. This means use of document.write, so people just put this on their site in the body where they want the link to appear:
However, if you want to cater for those who wouldn't want additional junk in their external JS files and won't put any <script> tags in their body (like me), I think you could just do this with PHP, using the referrer in the header from the link (yes, I know not all user agents send referrer headers, but if this is the unlikely case you can point it out and make the person type the stuff out manually). Then your script downloads the page in question and you parse it, looking for the <title>, and you extract the title text. Should be fairly simple, but it would require use of the cURL extension for PHP which isn't installed by default.