SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Mar 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    DOM - Extending a form and table

    So, this is hard. How do I extend both the table and the input form? Ultimately, I want it to look like this:
    _____________________________
    |header |header |header |header |
    | INPUT | INPUT | INPUT | INPUT |
    Add Row of Inputs Link
    _____________________________
    |header |header |header |header |
    | INPUT | INPUT | INPUT | INPUT |
    | INPUT | INPUT | INPUT | INPUT |
    Add Row of Inputs Link

    I know how to make the html row by using getElementById() or so and I know how to make an input field by createElement() but how do I create and append(?) them together, specifically the multiple input fields inside of the html row?

    Thanks for any help.

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    you use appendChild(). Have a look at this: http://www.howtocreate.co.uk/tutoria...ript/dombasics and search for appendChild in it.

    Using createElement(), you create the table row, and then you create your input element in the same way. Append it to the table row using appendChild() four times. Instead of creating the input element four times using createElement(), use cloneNode().


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •