Molo: getValue will get the value of an element not its innerHTML.
http://www.prototypejs.org/api/element/update i would use update(); $('someNode').update('<li>My lovely html</li>'); Alex Mcauley http://www.thevacancymarket.com ----- Original Message ----- From: "molo" <[email protected]> To: "Prototype & script.aculo.us" <[email protected]> Sent: Monday, August 24, 2009 3:10 PM Subject: [Proto-Scripty] to InnerHTML or not to innerHTML? > > Is there an alternative to innerHTML for getting the text in a td > element (or any element) in the code below? > I tried value and getValue but that did not work > > Is there any reason not to use innerHTML. I seem to remember reading > that it is not a standardized way of doing things? > ------------------------------------------------------------------------ > > <thead id="headman" style=""> > <tr> > <td class="TableHeader">Account</td> > <td class="TableHeader">Shares</td> > <td class="TableHeader">Restricted Shares</td> > <td class="TableHeader">CostLocal</td> > <td class="TableHeader">CostBase</td> > <td class="TableHeader"/> > </tr> > </thead> > > ------------------------------------------------------------------------ > header = $('headman'); > headerTd = header.select('td.TableHeader'); > headerTd.each(function(e){ > cell = e.innerHTML; > row = row + cell + "\t"; > }); > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
