Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6969623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:36:18+00:00 2026-05-27T16:36:18+00:00

see the attached image for above treeview menu code : ret = <ul id=’navigation1′>

  • 0

see the attached image

enter image description here

for above treeview menu code :

      ret = "<ul id='navigation1'>"
      tree.each do |node|
#       if node.InstallationName == parent_id
          ret += "<li>"
          ret += link_to_remote(node.InstallationName, :url => {:controller => "ptcgeodatabase", :action => "page_node"},
                  :with => "'installation_name_delete='+'#{node.InstallationName}'",:update => "mcfcontent1")
          Geoptcmenu.connectdb($mantmasterdblocation)
          sub = Geoptcmenu.find(:all,:select=>'Distinct MCFName',:conditions=>['InstallationName=?', node.InstallationName])
          ret += display_mcftree_child(sub, node.InstallationName)
          ret += "</li>"
#        end
      end
       ret += "</ul>"

and for show context menu while right click i have written code :

$('#navigation1').contextMenu('context-menu-1', {
        'Delete Installation': {
         click: function(element) {  // element is the jquery obj clicked on when context menu launched

            $.post("/ptcgeodatabase/deletemcf", {

            }, function(data){
               window.location.href = "/ptcgeodatabase/ptcgeo_mcfextractor"
            });
         },
         klass: "ocemenu-item-1" // a custom css class for this menu item (usable for styling)
       }});

i am not able to get the which element i have right clicked . is any way to get name of right clicked element?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:36:19+00:00Added an answer on May 27, 2026 at 4:36 pm
        ret = "<ul id='navigation1'>"
              tree.each do |node|
        #       if node.InstallationName == parent_id
                  ret += "<li>"
                  ret += link_to(node.InstallationName, "#")
                  Geoptcmenu.connectdb($mantmasterdblocation)
                  sub = Geoptcmenu.find(:all,:select=>'Distinct MCFName',:conditions=>['InstallationName=?', node.InstallationName])
                  ret += display_mcftree_child(sub, node.InstallationName)
                  ret += "</li>"
        #        end
              end
               ret += "</ul>"
    
    
     $(function() {
                    $('#navigation1 li').mousedown(function(event) {
                        var selectedelementid = this.id;
                        if (selectedelementid)  {               
                        switch (event.which) {
                            case 1:
                                //alert('Left mouse button pressed');
                                $('#navigation1 li').removeClass('selected');
                                $(this).addClass('selected');
                                $.post("/ptcgeodatabase/page_node", {
                                    installation_name_delete: selectedelementid
                                });
                                break;
    
                            case 2:
                                var message ="<div style="+"padding-top:30px;padding-left:5px;color:red;padding-right:5px;padding-bottom:10px;font-size:small;"+">You have clicked middle mouse button</div>";
                                $.colorbox({html:message ,transition:"none" ,width:"300px" ,height:"150px"});
                                //alert('You have clicked middle mouse button.');
                                break;
                            case 3:
                                //alert('Right mouse button pressed');
                                $('#navigation1 li').removeClass('selected');
                                $(this).addClass('selected');
                                $.post("/ptcgeodatabase/page_node", {
                                    installation_name_delete: selectedelementid
                                });
                                break;
                            default: break;
                        }
                        }
                    });         
                });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please see the attached image: 1) I downloaded a new library here: ( http://www.java2s.com/Code/Jar/ABC/Downloadcommonslang24jar.htm
Please see attached image. alt text http://img241.imageshack.us/img241/3585/customcost.png Can you please tell me what query
Please see attached image alt text http://img248.imageshack.us/img248/7743/datefrom.png I have a table which have FromDate
I have an iPhone screen (see attached image) where the UITextView fills almost the
I am working on icon based main menu for my Android application (see attached
How to change the developer name in the appstore. see attached image
See attached image. I have clicked 'Show data Labels' on my bubble diagram, this
I am new in android development.Please see the Attached image also Please check this
As you can see from the attached image the CPU graph on my dual
How can i place values on the 'google.visualization' graph ? please see image attached.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.