Click here to Skip to main content
15,914,111 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi

this script called when user right click on a link in browser and click on a custom item and it returns the address of the external page , i want to retrieve the address of link that user clicked , what script do this?
and how can i do this?






XML
<SCRIPT>
alert(external.menuArguments.document.URL);
</SCRIPT>
Posted
Updated 20-Sep-11 18:54pm
v2

Hi,

Try this it can helps you

HTML
<a href="Default3.aspx" id="getidlink" onclick="return getlink()">clickhere</a>


And javascript contains following method

JavaScript
function getlink() {
         alert(document.getElementById("getidlink").href);
         return false;
     }



All the Best
 
Share this answer
 
VB
<a href="myotherlink.html" onclick="myfunc(this);">Link to edit page</a>


JavaScript
function myfunc(_this)
{
var href = $(this).attr('href');
alert(href);
}
 
Share this answer
 

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