Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About mike.younes

  • Rank
  1. issue fixed. now dealing with other ######
  2. oki removed the var ul = $("<ul>").appendTo(node) and put it before the for loop it fixed the first few branches places, but not after that (for example control2 is still a child of control1 in sub2 of main1)
  3. i have a json file (2nd link) and im using a code to get the objects of the json file and output them as a tree. however the nodes are coming out misplaced. for example Mainstation 2 should be a sibling to Mainstation1, however it is coming out as a child of it. the problem should be in the traverse function.https://jsfiddle.net/mikeyounes/4ndtmaun/1/https://api.myjson.com/bins/5a9vo
  4. https://jsfiddle.net/mikeyounes/4ndtmaun/1/https://api.myjson.com/bins/5a9vo
  5. the problem should be in the traverse function. its a logic problem
  6. thanks for the reply. the code is working. im getting a tree as output. the problem is that the branches within the tree are not where they are supposed to be. for example, mainstations are supposed to be siblings, but im getting mainstation 2 as a child of mainstation 1. ill post the json
  7. im trying to output a json file to an expandable tree using html and jquery. its working, but the nesting and nodes within the tree are misplaced. any idea what that is? for example. mainstation 2 is coming out as a child of mainstation 1, while they should be siblings. it should be a logic error html code:<!DOCTYPE html><html> <head> <meta charset="UTF-8" /> <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $.ajax({ url:
  8. I got an XML file. I wrote a HTML code that traverses the xml file and outputs it as a tree from the html file Im trying to figure out how to attach a link to the xml elements, such as when I click on the name in the output, its open a website. I tried: < Control><![CDATA[<a href='http://www.transientminds.org'>Cli... Here for a demo</a>]]></Control> Also tried: < ?xml version="1.0" encoding="UTF-8"?>< MAIN xmlns:xlink="http://www.w3.org/1999/xlin... MAIN< MainStation xlink:type="simple" xlink:href="http://google.com"
  • Create New...