Entry
How Can I Create Context Menu ?
Apr 8th, 2008 18:09
ha mo, Abolfazl Shirazi, Abolfazl Shirazi
Abolfazl Shirazi :
Well I asked this question one year ago but nobody can answer it until
now.
Recently I could find a solution below (Using ActiveX Object) :
<!-- Begin -->
<html>
<head>
<script language="JavaScript"><!--
menuon=false;
function contextmenu(e) {
if (event.button == 2) {
menuon=true;
popmenu.RemoveAllItems();
popmenu.AddItem("He is a good javascript developer !","Abolfazl
Shirazi","","");
popmenu.AddItem("Really nice and cool. I like
it !","Javascript","","");
popmenu.AddItem("A good helpful site for
everybody.","FAQ.com","","");
popmenu.Popup (event.x,event.y);
}
}
document.onmousedown = contextmenu;
//-->
</script>
<script language="javascript" for="popmenu" event="onclick(e)">
alert(e)
</script>
</head>
<body>
<h1>Right Click On The Page To See The ContextMenu !</h1>
<object id="popmenu" name="popmenu" width=110 height=110
classid="CLSID:F5131C24-E56D-11CF-B78A-444553540000"></object>
</body>
</html>
<!-- End -->
I hope that the next time I achieve my answer sooner !!!
Enjoy It Friends !!!
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com