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 9243133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:44:31+00:00 2026-06-18T08:44:31+00:00

Does anyone know if it’s possible to make the DynaTree jquery plugin handle two

  • 0

Does anyone know if it’s possible to make the DynaTree jquery plugin handle two HREF links per node?

I have one link working fine but I’m also looking at a request to display a “contacts” image on the right-hand side of each clickable node which, when clicked produces a popup (I know, not my design) of other users working on the same item.

I can display the image fairly easily using a SPAN tag but since the existing HREF is the one trapped by OnActivate, I’m having real trouble making it do anything.

All advice welcomed.

  • 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-06-18T08:44:32+00:00Added an answer on June 18, 2026 at 8:44 am

    I discovered a better way.

    <script type="text/javascript">
         $(function () {
             $("#tree").dynatree({
                 initAjax: {
                     type: "POST", 
                     url: "TreeView/GetNodes"
    
                    // This gets data from an MVC3 controller
                    // in the form of a serialised list of nodes
                   // with custom attributes.
    
                 },
                 //here's the meat of it - 
                 // elements are created and added 
                 // according to the custom data values in the node
    
                 onRender: function (node, nodeSpan) {
                     if (node.data.hasPostImage) {
                         var postImg = document.createElement('img');
                         postImg.setAttribute('src', node.data.postImageUrl);
                         postImg.setAttribute('class', node.data.postImageClass);
                         postImg.setAttribute('alt', node.data.postImageAltText);
                         postImg.setAttribute('onClick', 'javascript:loadContacts(\'' + node.data.postImageScriptHref + '\');');
    
                         // the element is then appended to the Anchor tag (title)
                         // using jquery.after.
    
                         // it works really well, except for IE7.  Working on that now.
    
                         $(nodeSpan).find('.dynatree-title').after(postImg);
                     }
                 },
                 onClick: function (node) {
                 node.toggleExpand();
                 }
             });
         });    
      </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know of any samples that use the DataTables jquery plugin with a
Does anyone know how to detect the clicked href URL in JQuery? For example
Does anyone know how to make entity_id visible on the frontend as a sortable
Does anyone know if it is possible to change homescreen. I have a setup
Does anyone know how to target two specific records with the same name seperately?
Does anyone know if its possible to deploy to a server in a VPN
Does anyone know whether it's possible to change the header text in a Visual
Does anyone know if it's possible to pick a file that's been shared with
Does anyone know if it is possible to collect system information using the new
Does anyone know if there is a way to generate different code in the

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.