This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques and have Mario Casciaro & Luciano Mammino on-line!
See this thread for details.
Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Adding a row to a HTML table on-the-fly

 
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
I'm trying to add rows in a HTML table at the browser end. I plan to make use of the DOM2 functionalities like createElement, createTextNode etc., But using these methods I am able to create a para and text in it but i can't add a new row to a table.
This is my complete code. Where do I miss out?

thanks
Sudharsan
[ January 23, 2003: Message edited by: Sudharsan G'rajan ]
 
Sudharsan Govindarajan
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey!
I had a tough time with this UBB. It was not allowing me to include the following piece of code for the BUTTON object's onclick method
addNewEntryToTable ('111','222', '333')
UBB cribs saying that it found a '<' and asks me to replace it with '<'
I tried typing it here, but i can't. So I rephrased it as BUTTON object's onclick method
[ January 23, 2003: Message edited by: Sudharsan G'rajan ]
 
Sudharsan Govindarajan
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I solved it. It seems we need to create a "TBODY" element and add the "TR" to it. And then, the TBODY object needs to be added (instead of adding the TR directly) to the TABLE object.
-sudharsan
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic