JavaScript.CoolDev.Com Support Forums

Any questions related to JavaScript menu and JavaScript tree menu by Javascript.CoolDev.Com

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Custom Fields

 
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsTree
Author Message
toledoj



Joined: 05 Nov 2007
Posts: 1

PostPosted: Mon Nov 05, 2007 9:17 pm    Post subject: Custom Fields Reply with quote

I have been trying to get custom fields to work and continue to bump into an error. I saw the example in a previous post:

var TREE_NODES =
[
['Caption', 'http://url/', 'someTargetFrame', {format:{customField1:"something", customField2:123, customField3:[1, 2, 3]}}],
];
var node = tree.nodeByID(...); // or whatever else method to get the reference
alert(node.getFormat().customField1);
alert(node.getFormat().customField2);
alert(node.getFormat().customField3);

I've tried this by having an caption_onclick function set up the does the alert(node.getFormat().customField1);

Instead of the custom field, I get an 'undefined' message. Is there something else to this?
I'm using the Pro version.
Back to top
AlexKunin
Developer


Joined: 03 Jan 2003
Posts: 1191

PostPosted: Fri Nov 09, 2007 1:51 pm    Post subject: Reply with quote

What exactly was undefined: node, node.getFormat, node.getFormat()? What version of the tree you're using?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsTree All times are GMT
Page 1 of 1