Today I want to share my javascript Context Menu control built with prototype.js.
It's pretty simple to use it :
In the head section of page add such code:
<link href="style/style.css" rel="stylesheet" type="text/css" />
<script type ="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/domutils.js"></script>
<script type="text/javascript" src="js/menu.js"></script>
<script type="text/javascript">
window.onload=function(){
var items = [
{ text: "Choose address", onclick:function(){alert("item0");} },
{ type: "divider"},
{ text: "Copy", onclick:function(){alert("item1");} }
];
var menu =new ContextMenu("table_body",items);
// menu.onBeforeShow =function(menu){ alert("on before show");};
// menu.onClose = function(menu){alert("on close");}
}
</script>
Â
Where:
<!--googleAd-->
var items -JSON of items.
ContextMenu("table_body",items); - contstructor wich has in params "table_body" - id of element fo context menu.As use it's very simple in usage control.
It was tested in IE6 and FF5
Here is example
Enjoy to use it.
Download source from attach.
Mammoth amount of people are online and millions more want are planning have a web presence. For web presence one needs a web host. A web host possesses web hosting server that has website content on it much like we have content on our pc. These servers share their contents with us just like we use file sharing. Process of getting web hosting is pretty simple.You have to choose and register with a web hosting company such as anhosting and put your files of website on their servers. If you don’t have a website most hosting companies offer several free design templates to get you started. These days hosting firms throw in some online advertising credit when you signup with them that is a great way to get started promoting your website.
Igor Kononuchenko
Hi,
I want to use the contextmenu, but both the example link and the zip file are broken :-(