SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Create/Duplicate field

    Hi:

    I have some fields which I want to duplicate to add more values as required.

    I have SELECT and TEXTAREA combination

    HTML Code:
    <frameset>
     <div id="repeat_task">
      <select name="box[]">
       <option>1</option>
     </select>
     <textarea>value</textarea>
     </div>
    </frameset>
    Is there a way to duplicate these 2 fields by clicking a BUTTON?

    The problem is SELECT (MULTIPLE) and TEXTAREA combination. Is there any other way to combine these 2?

    thanks
    ---------------------------
    Errors = Improved Programming.
    My Site

  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)
    Yes, using cloneNode(), followed by appendChild(). If you want that <select> to be multiple, you need to add the attribute multiple="multiple".


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
  •