jQuery in Action, 3rd edition
The moose likes HTML, CSS and JavaScript and the fly likes Capture Browser url Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Capture Browser url" Watch "Capture Browser url" New topic

Capture Browser url

Himanshu Gupt

Joined: Dec 03, 2006
Posts: 13
My requirement is , when I click on some button present in toolbar, I want to capture url of the page and show it in a alert box. How can I achieve that using javascript.

Thanks in Advance

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
Not sure what the toolbar is but you can look at document.location.href

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Capture Browser url
It's not a secret anymore!