[Laszlo-user] addNode question

Daniel Williams dwilliams at datainventory.com
Wed Jan 30 20:30:32 PST 2008


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