dhtmlXTreeObject: Safari error loading XML
Hi,
I am using newtree.loadXML('DPData.aspx?...') to load the level 1 tree and using newtree.setXMLAutoLoading("DPData.aspx?Type=getSubTree") to load the subtree. IE works great to load the subtree; however, I am getting error in Safari.
Please help.
Wing
The parent XML data is:
<?xml version="1.0" encoding="iso-8859-1"?>
<tree id="0" radio="1">
<item text="30 Rock" id="197606.48292" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" child="1">
<userdata name="type">production</userdata>
</item>
<item text="Green Zone Thriller" id="197508.48194" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" child="1">
<userdata name="type">production</userdata>
</item>
<item text="Group Zone Thriller" id="197707.48393" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" child="1">
<userdata name="type">production</userdata>
</item>
<item text="House" id="197605.48291" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" child="1">
<userdata name="type">production</userdata>
</item>
<item text="Law &amp; Order SVU" id="197607.48293" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" child="1">
<userdata name="type">production</userdata>
</item>
<item text="Law and Order" id="197527.48213" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" child="1">
<userdata name="type">production</userdata>
</item>
<item text="QA Show" id="197708.48394" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" child="1">
<userdata name="type">production</userdata>
</item>
<item text="State of Play" id="197528.48214" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" child="1">
<userdata name="type">production</userdata>
</item>
<item text="The Office" id="197608.48294" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" child="1">
<userdata name="type">production</userdata>
</item>
<item text="Traveller" id="197529.48215" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" child="1">
<userdata name="type">production</userdata>
</item>
<item text="USAAS" id="197645.48331" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" child="1">
<userdata name="type">production</userdata>
</item>
</tree>
The child XML file is:
<?xml version="1.0" encoding="iso-8859-1"?>
<tree id="197606.48292" radio="1">
<item text="Episode 00211" id="episode189418" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" child="1">
<userdata name="type">episode</userdata><item text="Dailies" id="mhdr1044505" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" child="1"><item text="Reel 012 Day 5" id="media1044505" im0="film.gif" im1="film.gif" im2="film.gif" child="0"><userdata name="type">media</userdata><userdata name="viewed">1</userdata><userdata name="offset">43179.95703125</userdata><userdata name="mediaid">1044505</userdata><userdata name="prodid">197606</userdata><userdata name="epid">189418</userdata><userdata name="atyp">dailyreel</userdata><userdata name="mediafile">rtsp://3.23.187.50/dailiesBUSTG/staging/30RO_00211_005_012_1500k.wmv</userdata><userdata name="name">30 Rock / Episode 00211 / Reel 012 / Shooting Day 5</userdata></item><item text="Reel 011 Day 4" id="media1044503" im0="film.gif" im1="film.gif" im2="film.gif" child="0"><userdata name="type">media</userdata><userdata name="viewed">1</userdata><userdata name="offset">39579.95703125</userdata><userdata name="mediaid">1044503</userdata><userdata name="prodid">197606</userdata><userdata name="epid">189418</userdata><userdata name="atyp">dailyreel</userdata><userdata name="mediafile">rtsp://3.23.187.50/dailiesBUSTG/staging/30RO_00211_004_011_1500k.wmv</userdata><userdata name="name">30 Rock / Episode 00211 / Reel 011 / Shooting Day 4</userdata></item><item text="Reel 010 Day 4" id="media1044501" im0="film.gif" im1="film.gif" im2="film.gif" child="0"><userdata name="type">media</userdata><userdata name="viewed">1</userdata><userdata name="offset">35979.781250</userdata><userdata name="mediaid">1044501</userdata><userdata name="prodid">197606</userdata><userdata name="epid">189418</userdata><userdata name="atyp">dailyreel</userdata><userdata name="mediafile">rtsp://3.23.187.50/dailiesBUSTG/staging/30RO_00211_004_010_1500k.wmv</userdata><userdata name="name">30 Rock / Episode 00211 / Reel 010 / Shooting Day 4</userdata></item><item text="Reel 009 Day 4" id="media1044499" im0="film.gif" im1="film.gif" im2="film.gif" child="0"><userdata name="type">media</userdata><userdata name="viewed">1</userdata><userdata name="offset">0</userdata><userdata name="mediaid">1044499</userdata><userdata name="prodid">197606</userdata><userdata name="epid">189418</userdata><userdata name="atyp">dailyreel</userdata><userdata name="mediafile">rtsp://3.23.187.50/dailiesBUSTG/staging/30RO_00211_004_009_1500k.wmv</userdata><userdata name="name">30 Rock / Episode 00211 / Reel 009 / Shooting Day 4</userdata></item><item text="Reel 007 Day 3" id="media1044496" im0="film.gif" im1="film.gif" im2="film.gif" child="0"><userdata name="type">media</userdata><userdata name="viewed">1</userdata><userdata name="offset">25179.96484375</userdata><userdata name="mediaid">1044496</userdata><userdata name="prodid">197606</userdata><userdata name="epid">189418</userdata><userdata name="atyp">dailyreel</userdata><userdata name="mediafile">rtsp://3.23.187.50/dailiesBUSTG/staging/30RO_00211_003_007_1500k.wmv</userdata><userdata name="name">30 Rock / Episode 00211 / Reel 007 / Shooting Day 3</userdata></item></item></item><item text="Episode 00214" id="episode190097" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" child="1"><userdata name="type">episode</userdata><item text="Dailies" id="mhdr1045522" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" child="1"><item text="Reel 016 Day 9" id="media1045522" im0="film.gif" im1="film.gif" im2="film.gif" child="0"><userdata name="type">media</userdata><userdata name="viewed">1</userdata><userdata name="offset">0</userdata><userdata name="mediaid">1045522</userdata><userdata name="prodid">197606</userdata><userdata name="epid">190097</userdata><userdata name="atyp">dailyreel</userdata><userdata name="mediafile">rtsp://3.23.187.50/dailiesBUSTG/staging/30RO_00214_009_016_1500k.wmv</userdata><userdata name="name">30 Rock / Episode 00214 / Reel 016 / Shooting Day 9</userdata></item></item></item></tree>
Provided XML snippets work correctly in all main browsers.
The only problem - you are using "child" attribute for branches which already has XML childs loaded, you need to use such attribute only for branches whicn need to be loaded from server.
Please check attached sample.