Click here to Skip to main content
15,913,941 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
i want to access the address of a link ,the following script return the address of url ,i want to access to the address of link the user clicked , i wrote this script in a file in html format and i created a key in hkcu\software\microsoft\internet explorer\menuext\sample item of registry

and i assign the address of that html file to that key.ok?
when i click to 'sample item' in context menu of internet explorer it is return that
address of url , i want to access to the address of link i clicked , what script do this?
any one can help me?

XML
<SCRIPT>
alert(external.menuArguments.document.URL);
</SCRIPT>
Posted

1 solution

Hi ,

You want see present url in browser thn use this line .

JavaScript
function f1() {
       alert(location.href);
   }


call this method to show url of that webpage


All the best
 
Share this answer
 
Comments
a.bolandnataj106 20-Sep-11 8:13am    
it return the address of the html file that contain this script
Muralikrishna8811 20-Sep-11 8:18am    
Sry If misunderstood your question
what exactly you want to retrieve.
An external page url right?
a.bolandnataj106 20-Sep-11 8:25am    
ok , i want to retrieve the address of link was clicked
<SCRIPT>
alert(external.menuArguments.document.URL);
</SCRIPT>
this script in a html file and while the user right click on a link and click on context menu that i added to internet explorer context menu it returns the url of that page , but i want to retrieve the address of link that user clicked, can you help me?
what script i must use?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900