document.location is the same as document.URL but is deprecated - you would need window.location.
I assume you mean for people to put the link on their page. Where would they be putting this javascript? You can't expect people to put it in their <head>, attach an event listener to a link they have to create and on top of that tolerate popups. If you intend the popup to appear when the page loads, that's even worse and will likely be stopped by most popup blockers.
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:
Code:
<script type="text/javascript">document.write('<a href="http://www.waste-some-time.com/toolbaradder.php?title='+document.title+'&url='+window.location);</script>
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.
Bookmarks