The second argument will be parsed as text, not as html so you have to
provide an array of child elements:

// untested but should more or less work
td2 = Builder.node('td', [
  Builder.node('a', {href: '#''}, 'link')
]);


./martin

On 5/10/07, Yuan Yudistira <[EMAIL PROTECTED]> wrote:
>
> Hello guys,
>
> I need some help ... :-)
>
> I try to use Builder.node, (add new row)
>
> But I need to add  HTML tag on node td2
>
> But what I get using below code is
> text '<a href=#>list</a> , instead of  link
>
> Please help ...
>
>
> Thanks
>
>
> YUAN
>
>
> function submitAddNewStaffForm()
> {
>
>         var notice = $('contentDiv');
>         var form = $('newStaffForm');
>         var staffName = $F('formName');
>
>         form.request();
>         form.request({
>           onLoading: notice.update("saving data .. ..."),
>           onComplete: function(transport){
>                 notice.update("Form data saved...");
>                 var newID = transport.responseText;
>                 newRow = Builder.node('tr');
>                 td1 = Builder.node('td',staffName);
>                 td2 = Builder.node('td','<a href=#>list</a>');
>                  newRow.appendChild(td1);
>                  newRow.appendChild(td2);
>                 $('listStaff').appendChild(newRow);
>                  }
>         })
> }
>
>
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> "Limitless undying love
> which shines around me like a million suns
> It calls me on and on across the universe...."
> Accross The Universe   - The Beatles -
> --------------------------------------------
> Visit :
> http://www.sabukhitam.com/
> ======================
>
> >
>


-- 
burnfield.com/martin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to