Yes we can,
I hope below example helps you.Instead of onclick you have to use oncontextmenu.
// e is the event which gecko engines required where el is the <li> tag
function showMenu(e,el) {
with(el) {
position='absolute';
style.cssText="font:...."; // your css for menu appearance.
left= (window.event) ? event.clientX : e.clientX;
top= (window.event) ? event.clientY : e.clientY;
display = "block";
}
return false;// suspend the browser specific right click menu.
}
Just try this ..
Keep Smiling that doesn't cost you much...
Hari Kishore.
|