<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: jsTree v.0.7</title>
	<atom:link href="http://vakata.com/en/archives/13/feed" rel="self" type="application/rss+xml" />
	<link>http://vakata.com/en/archives/13</link>
	<description>Sometimes I sit and wonder... and sometimes I just sit</description>
	<lastBuildDate>Wed, 17 Dec 2008 08:19:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Nostrum</title>
		<link>http://vakata.com/en/archives/13/comment-page-2#comment-207</link>
		<dc:creator>Nostrum</dc:creator>
		<pubDate>Fri, 24 Oct 2008 15:19:30 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=13#comment-207</guid>
		<description>I finally have solved this.
If someone is interested:
  1.- I enabled the cookies in tree init:
     cookies : {prefix : &quot;tree&quot;},
  2.- Now i have the cookie tree_selected wich says me the selected node.
   3.- Whe my own ajax function (external to jstree) returns on his &quot;success&quot; y call to this function ChangeSelectedIDValue(newIDvalues)


function ChangeSelectedIDValue(newID)
{
 var myID = document.getElementById($.cookie(&#039;tree_selected&#039;));
myID.setAttribute(&#039;id&#039;,newID);			
}

So, now i have the id value updated</description>
		<content:encoded><![CDATA[<p>I finally have solved this.<br />
If someone is interested:<br />
  1.- I enabled the cookies in tree init:<br />
     cookies : {prefix : &#8220;tree&#8221;},<br />
  2.- Now i have the cookie tree_selected wich says me the selected node.<br />
   3.- Whe my own ajax function (external to jstree) returns on his &#8220;success&#8221; y call to this function ChangeSelectedIDValue(newIDvalues)</p>
<p>function ChangeSelectedIDValue(newID)<br />
{<br />
 var myID = document.getElementById($.cookie(&#8216;tree_selected&#8217;));<br />
myID.setAttribute(&#8216;id&#8217;,newID);<br />
}</p>
<p>So, now i have the id value updated</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nostrum</title>
		<link>http://vakata.com/en/archives/13/comment-page-2#comment-188</link>
		<dc:creator>Nostrum</dc:creator>
		<pubDate>Tue, 21 Oct 2008 13:24:00 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=13#comment-188</guid>
		<description>Obviously, i want to change the currently selected node &quot;id&quot;</description>
		<content:encoded><![CDATA[<p>Obviously, i want to change the currently selected node &#8220;id&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nostrum</title>
		<link>http://vakata.com/en/archives/13/comment-page-2#comment-186</link>
		<dc:creator>Nostrum</dc:creator>
		<pubDate>Tue, 21 Oct 2008 11:52:22 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=13#comment-186</guid>
		<description>Hi Vakata:
  I have see the new Jstree site. Congratulations!
  Excuse me for not sending you examples. I have some problem with them. Will work on it ;-).
  But now, I have a different problem. Maybe you can help me.
  As I say you in other post I save node info in the &quot;id&quot; of the node. When i want to create a new node  use oncreate callback to call with ajax to server. Then, I change the node &quot;id&quot;, as you say,  with 
   $(NODE).attr(&quot;id&quot;, data);
   
  The problem is that now, i want to change the node &quot;id&quot; without using the callback functions. Is there posible?
Excuse me if this is a very obvious question, but i´m not a javascript programer.
   Thanks in advance!</description>
		<content:encoded><![CDATA[<p>Hi Vakata:<br />
  I have see the new Jstree site. Congratulations!<br />
  Excuse me for not sending you examples. I have some problem with them. Will work on it ;-).<br />
  But now, I have a different problem. Maybe you can help me.<br />
  As I say you in other post I save node info in the &#8220;id&#8221; of the node. When i want to create a new node  use oncreate callback to call with ajax to server. Then, I change the node &#8220;id&#8221;, as you say,  with<br />
   $(NODE).attr(&#8220;id&#8221;, data);</p>
<p>  The problem is that now, i want to change the node &#8220;id&#8221; without using the callback functions. Is there posible?<br />
Excuse me if this is a very obvious question, but i´m not a javascript programer.<br />
   Thanks in advance!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vakata</title>
		<link>http://vakata.com/en/archives/13/comment-page-2#comment-185</link>
		<dc:creator>vakata</dc:creator>
		<pubDate>Fri, 17 Oct 2008 09:57:11 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=13#comment-185</guid>
		<description>@Nostrum
What do you put in the head?
And can you show me an example? 
I&#039;ll try putting a &lt;base&gt; tag and see what happens.</description>
		<content:encoded><![CDATA[<p>@Nostrum<br />
What do you put in the head?<br />
And can you show me an example?<br />
I&#8217;ll try putting a &lt;base&gt; tag and see what happens.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nostrum</title>
		<link>http://vakata.com/en/archives/13/comment-page-2#comment-184</link>
		<dc:creator>Nostrum</dc:creator>
		<pubDate>Fri, 17 Oct 2008 09:53:56 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=13#comment-184</guid>
		<description>Excuse me: 

I don´t know why my last post has deleted the line about href. I was writing about http://www.w3schools.com/TAGS/tag_base.asp

The line was (I hope let´s see it):
   </description>
		<content:encoded><![CDATA[<p>Excuse me: </p>
<p>I don´t know why my last post has deleted the line about href. I was writing about <a href="http://www.w3schools.com/TAGS/tag_base.asp" rel="nofollow">http://www.w3schools.com/TAGS/tag_base.asp</a></p>
<p>The line was (I hope let´s see it):</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nostrum</title>
		<link>http://vakata.com/en/archives/13/comment-page-2#comment-183</link>
		<dc:creator>Nostrum</dc:creator>
		<pubDate>Fri, 17 Oct 2008 09:40:13 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=13#comment-183</guid>
		<description>Hi Vakata:

  I have a very curious problem.

  The tree works now perfectly. I can add nodes, delete nodes, call by ajax to my server and get the answer.
  The problem is, when I put in the head:
      

  The tree now fails:
    Let´s supose we are working on www.mysite.com/tree.
    Whe I want to delete a node, the node is deleted, but inmediately the site is redirected to the base href.
    The same when i want to create and when i want to rename.

    I need to use base href, to write the correct ajax urls in this mode:
      $(&#039;base&#039;).attr(&#039;href&#039;) + relative_url

Thank you very much in advance.</description>
		<content:encoded><![CDATA[<p>Hi Vakata:</p>
<p>  I have a very curious problem.</p>
<p>  The tree works now perfectly. I can add nodes, delete nodes, call by ajax to my server and get the answer.<br />
  The problem is, when I put in the head:</p>
<p>  The tree now fails:<br />
    Let´s supose we are working on <a href="http://www.mysite.com/tree" rel="nofollow">http://www.mysite.com/tree</a>.<br />
    Whe I want to delete a node, the node is deleted, but inmediately the site is redirected to the base href.<br />
    The same when i want to create and when i want to rename.</p>
<p>    I need to use base href, to write the correct ajax urls in this mode:<br />
      $(&#8216;base&#8217;).attr(&#8216;href&#8217;) + relative_url</p>
<p>Thank you very much in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nostrum</title>
		<link>http://vakata.com/en/archives/13/comment-page-1#comment-178</link>
		<dc:creator>Nostrum</dc:creator>
		<pubDate>Wed, 15 Oct 2008 13:22:25 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=13#comment-178</guid>
		<description>Hi Vakata:

  This works great!
  Anyway, I will see metadata jquery plugin. Maybe it is a best way to do it...

Thank you very much.</description>
		<content:encoded><![CDATA[<p>Hi Vakata:</p>
<p>  This works great!<br />
  Anyway, I will see metadata jquery plugin. Maybe it is a best way to do it&#8230;</p>
<p>Thank you very much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vakata</title>
		<link>http://vakata.com/en/archives/13/comment-page-1#comment-177</link>
		<dc:creator>vakata</dc:creator>
		<pubDate>Wed, 15 Oct 2008 12:25:52 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=13#comment-177</guid>
		<description>I am not sure if this is the best way to store data about the nodes (check the metadata jquery plugin - it is integrated in jsTree). 
Still - since you are using oncreate and making an AJAX call - use the return data of the server (have the server return the text that you need for the id attribute). For example:
&lt;code&gt;
oncreate : function(NODE, REF_NODE, TYPE, TREE_OBJ) { 
&#160;&#160;$.get(&quot;YOUR_URL_HERE&quot;, function (data) {
&#160;&#160;&#160;&#160;$(NODE).attr(&quot;id&quot;, data);
&#160;&#160;});
}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>I am not sure if this is the best way to store data about the nodes (check the metadata jquery plugin &#8211; it is integrated in jsTree).<br />
Still &#8211; since you are using oncreate and making an AJAX call &#8211; use the return data of the server (have the server return the text that you need for the id attribute). For example:<br />
<code><br />
oncreate : function(NODE, REF_NODE, TYPE, TREE_OBJ) {<br />
&nbsp;&nbsp;$.get("YOUR_URL_HERE", function (data) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;$(NODE).attr("id", data);<br />
&nbsp;&nbsp;});<br />
}<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nostrum</title>
		<link>http://vakata.com/en/archives/13/comment-page-1#comment-176</link>
		<dc:creator>Nostrum</dc:creator>
		<pubDate>Wed, 15 Oct 2008 11:54:02 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=13#comment-176</guid>
		<description>Hi Vakata:

   I use jsTree as predefined HTML (with UL as you say in your doc).
   The tree is working correctly.
   I use the id parameter of &quot;li&quot; to pass all information I need. So id=&quot;node_id=10,other_info=info&quot;.

   In this way, when i wan´t to create a new node i use oncreate callback to call with ajax to server. In this call I send the parent node id and it works perfectly.

   The problem: the new node has not this info in his &quot;li&quot;, so, if i want to delete this new node i can´t find this info and my server don´t know what to do. (The only way to do it is reload all the page to get the all tree well formatted)

   The question is: When I create the node, how can i create his &quot;li&quot; with all the info I need. If i can´t generate just this &quot;li&quot; how can i update all the &quot;ul&quot;?

   Thank you very much in advance and excuse me for my poor english.</description>
		<content:encoded><![CDATA[<p>Hi Vakata:</p>
<p>   I use jsTree as predefined HTML (with UL as you say in your doc).<br />
   The tree is working correctly.<br />
   I use the id parameter of &#8220;li&#8221; to pass all information I need. So id=&#8221;node_id=10,other_info=info&#8221;.</p>
<p>   In this way, when i wan´t to create a new node i use oncreate callback to call with ajax to server. In this call I send the parent node id and it works perfectly.</p>
<p>   The problem: the new node has not this info in his &#8220;li&#8221;, so, if i want to delete this new node i can´t find this info and my server don´t know what to do. (The only way to do it is reload all the page to get the all tree well formatted)</p>
<p>   The question is: When I create the node, how can i create his &#8220;li&#8221; with all the info I need. If i can´t generate just this &#8220;li&#8221; how can i update all the &#8220;ul&#8221;?</p>
<p>   Thank you very much in advance and excuse me for my poor english.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vakata</title>
		<link>http://vakata.com/en/archives/13/comment-page-1#comment-171</link>
		<dc:creator>vakata</dc:creator>
		<pubDate>Sat, 11 Oct 2008 19:47:13 +0000</pubDate>
		<guid isPermaLink="false">http://vakata.com/en/?p=13#comment-171</guid>
		<description>Currently you cannot create in the same level - just select the upper node and then create, after that you can always reselect the original node. I will consider passing an argument for the create function for the next version.

Examples will be up soon with v.0.8.1</description>
		<content:encoded><![CDATA[<p>Currently you cannot create in the same level &#8211; just select the upper node and then create, after that you can always reselect the original node. I will consider passing an argument for the create function for the next version.</p>
<p>Examples will be up soon with v.0.8.1</p>
]]></content:encoded>
	</item>
</channel>
</rss>
