SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast rash's Avatar
    Join Date
    Dec 2004
    Location
    Earth
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    DOM object handling

    I would like to append some values to a form before I submit it. The problem is that the code will be executed in an other frame and the input frame shall not be reloaded. My idea was to create hidden inputs and then append it to the form (before submiting). That works fine with appendChild(). However if the user press save two times without leaving the frame, there will by duplicates for every value that has been added throught appendChild(). I need to remove every child that has ben append before I append the new ones. Im aware of the removeChild but that means I have to store every object in some collection of some sort and Im not really shure how to do that in JavaScript...
    RASH.

  2. #2
    SitePoint Evangelist SpaceFrog's Avatar
    Join Date
    Jan 2005
    Location
    Outerspace
    Posts
    511
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    why append hidden inputs if they are hidden ?
    Wouldn't it be less hassle to have the inouts already in the form ?
    If the problem is you don't know haow many value you need to add just put one hidden inout and add values with separator, then on submit just retrive value and split it ...

  3. #3
    SitePoint Enthusiast rash's Avatar
    Join Date
    Dec 2004
    Location
    Earth
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that just might work thx
    RASH.


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
  •