catch url by javascript
use
alert(document.location.href)
or
alert(window.location)
window.location.href gives you current url. Not sure if that's what you're asking though.