If you look at my code you can see there is a function-
}, function(action, el, pos) {
});
In this function action is the action that is getting executed this is basically href value of the anchor(a) except #. From this you can check which option is clicked. You can call a function based on your selection.
el in this fuction specifies which is the target element. You can do what ever modification you want to do with that.
Thanks & Regards
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog
this is mahesh, ur code is good....but i need to display the context menu on whole document when ever user clicks any where in the webpage not only on table.......if u have that code please mail the code to mail id....... koritala.mahesh@gmail.com.........thank
u
sivakl_2001
Contributor
2849 Points
1069 Posts
Menu on Row Click
Sep 08, 2011 05:47 AM|LINK
i want to show menu same like this on row click
pls help how can i implement same in dropbox
https://sites.google.com/site/sivakltech/dropbox/db3.JPG
asteranup
All-Star
30184 Points
4906 Posts
Re: Menu on Row Click
Sep 08, 2011 06:54 AM|LINK
Hi,
Try this-
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5.js" type="text/javascript"></script> <script src="http://labs.abeautifulsite.net/archived/jquery-contextMenu/demo/jquery.contextMenu.js" type="text/javascript"></script> <link href="http://labs.abeautifulsite.net/archived/jquery-contextMenu/demo/jquery.contextMenu.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> $(document).ready(function() { var navigationText = ""; var prev; $("table tr").contextMenu({ menu: 'myMenu' }, function(action, el, pos) { }); }); </script> </head> <body> <form id="form1" runat="server"> <table> <tr><td>data 1</td><td>data 2</td><td>data 3</td><td>data 4</td></tr> <tr><td>data 1</td><td>data 2</td><td>data 3</td><td>data 4</td></tr> <tr><td>data 1</td><td>data 2</td><td>data 3</td><td>data 4</td></tr> <tr><td>data 1</td><td>data 2</td><td>data 3</td><td>data 4</td></tr> <tr><td>data 1</td><td>data 2</td><td>data 3</td><td>data 4</td></tr> </table> <ul id="myMenu" class="contextMenu"> <li class="copy"><a href="#add">Add</a></li> <li class="edit"><a href="#edit">Edit</a></li> <li class="delete"><a href="#delete">Delete</a></li> <li class="quit separator"><a href="#cancel">Cancel</a></li> </ul> </form> </body> </html>Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog
sivakl_2001
Contributor
2849 Points
1069 Posts
Re: Menu on Row Click
Sep 09, 2011 03:26 AM|LINK
This website run in LAN somethime no internet connection
in this case how can i implement this style and script
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5.js" type="text/javascript"></script> <script src="http://labs.abeautifulsite.net/projects/js/jquery/contextMenu/demo/jquery.contextMenu.js" type="text/javascript"></script> <link href="http://labs.abeautifulsite.net/projects/js/jquery/contextMenu/demo/jquery.contextMenu.css" rel="stylesheet" type="text/css" />asteranup
All-Star
30184 Points
4906 Posts
Re: Menu on Row Click
Sep 09, 2011 04:19 AM|LINK
Hi,
Download all these files in your local project and add reference from there.
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog
sivakl_2001
Contributor
2849 Points
1069 Posts
Re: Menu on Row Click
Sep 09, 2011 05:41 AM|LINK
do u knw any other simple example
BU XI - MSFT
All-Star
22367 Points
2704 Posts
Microsoft
Re: Menu on Row Click
Sep 13, 2011 07:03 AM|LINK
Hello
For a simple one, you may look at AJAX control toolkit's HoverMenu, for your reference,
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/HoverMenu/HoverMenu.aspx
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code Framework
asteranup
All-Star
30184 Points
4906 Posts
Re: Menu on Row Click
Dec 13, 2011 11:44 AM|LINK
Hi,
If you look at my code you can see there is a function-
}, function(action, el, pos) { });In this function action is the action that is getting executed this is basically href value of the anchor(a) except #. From this you can check which option is clicked. You can call a function based on your selection. el in this fuction specifies which is the target element. You can do what ever modification you want to do with that.
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog
koritala.mah...
Member
4 Points
2 Posts
Re: Menu on Row Click
Jan 04, 2013 09:58 AM|LINK
hi,
this is mahesh, ur code is good....but i need to display the context menu on whole document when ever user clicks any where in the webpage not only on table.......if u have that code please mail the code to mail id....... koritala.mahesh@gmail.com.........thank u