I have created an option in IE context menu, so when I open IE, and right click in the window, the added menu is available. Now what I want to do is, I want to get the url of current window. So suppose I open www.facebook.com, then I right click, and choose the additional menu, I want to get the location as www.facebook.com.
How to do this using Javascript? I tried using:
alert(window.location.href);
However, the location is the location of my test.html file: which has this script:
<html>
alert(window.location.href);
</html>