That is because you need to build the anchor node as well, instead of passing
it as the textual value. You should also take advantage of the possibility to
nest child nodes:
var newRow = Builder.node('tr', [
Builder.node('td', staffname),
Builder.node('td', [ Builder.node('a', {href: '#'}, 'list') ])
]);
-Tobias
-----Oprindelig meddelelse-----
Fra: [email protected] [mailto:[EMAIL PROTECTED] På vegne
af Yuan Yudistira
Sendt: 10. maj 2007 12:38
Til: [email protected]
Emne: [Rails-spinoffs] Builder.node (script.aculo.us)
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/
======================
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---