[Laszlo-user] addNode question

Daniel Williams dwilliams at datainventory.com
Thu Jan 31 11:20:30 PST 2008


Pablo,
And it does...

Thanks to everyone's input.

-Daniel

Pablo Kang wrote:
> Hi Daniel,
>
> Unloess you have special characters in your keys (le.g. dash), you 
> don' need to qute  them. FOo exaple, { id: v1, data: v2 } should work 
> justfine.
>
> pablo
>
> On Wed, 30 Jan 2008, Daniel Williams wrote:
>
>> Thanks for the quick reply. You got me back on track.
>>
>> Here's the solution.
>>
>> dpTemp.addNode('datastore', "", {'id':v1, 'data':v2});
>>
>> Thanks
>> -Daniel
>> Henry Minsky wrote:
>>> Don't put the {}'s inside of quotes, you're turning it into a string!
>>>
>>> On Wed, Jan 30, 2008 at 10:52 PM, Daniel Williams
>>> <dwilliams at datainventory.com> wrote:
>>>
>>>> Hello,
>>>>
>>>>  I'm want to create a dynamic dataset in my Laszlo application. But 
>>>> I'm
>>>>  missing something simple when I'm adding multi able attributes to 
>>>> a node.
>>>>
>>>>  My code:
>>>>
>>>>  var v1 = 'a';
>>>>  var v2 = 'b';
>>>>  dpTemp.addNode('datastore', '{id:v1,data:v2}');
>>>>
>>>>  The XML should look like this.
>>>>  <datastore id="a" data="b"/>
>>>>
>>>>  But I'm getting this.
>>>>  <datastore>{id:v1,data:v2}</datastore>
>>>>
>>>>  Thanks up front.
>>>>
>>>>  -Daniel
>>>>
>>>>
>>>
>>>
>>>
>>>
>>
>>



More information about the Laszlo-user mailing list