SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I am unable to retrieve the parent id of a JS Tree node whenever it has a child node

    I'm using jsTree-0.9.9a.

    As a test this is the code i'm using to display the ID

    oncreate: function(NODE, REF_NODE, TYPE, TREE_OBJ, RB)
    {
    if (TYPE === "inside") {

    parent_id = $(REF_NODE).attr('id');
    alert(parent_id)
    }}

    This works fine when the parent has no child nodes, however, when a child
    node exists nothing is returned.

    Can anyone suggest what I'm doing wrong?

    Thanks in advance.

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    Is your issue anything close to one of these?

    http://code.google.com/p/jstree/issues/detail?id=184
    http://code.google.com/p/jstree/issues/detail?id=283

    Either way, I would strongly suggest going directly to the source.
    http://code.google.com/p/jstree/issues/list

    Where you will either find the solution, or be able to post an issue to help get fixed the one that you're facing.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •