Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Right-Click question

Status
Not open for further replies.

sleuth

Programmer
Jan 12, 2001
134
US

I have a right click menu script but I want to allow people to right click on links to save target as, how can I disable the right click menu and let the browser take over when you right click on the link?

Thanks,
Tony "Java?? Umm, I think that's the stuff I drink while I'm coding perl."
 
Hi tony,

wow, that's the first time I'll ever answer in that forum.

First, create a booleean:

var noRightClick = true;

and start an if in the main funtion of the script:

if (noRightClick == false)
{}
else
{ the rest of your function...}

then in your page you do
<a onMouseOver = &quot;(noRightClick=false)&quot; onMouseOut=&quot;(oRightClick=true)&quot;><img src=...></a>

this will let you use your right click menu everywhere else then on images.

Yan
 

Ahhhh, very nice, Thanks a lot Mate,

Thank You!

Tony &quot;Java?? Umm, I think that's the stuff I drink while I'm coding perl.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top