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...
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 ...
Bookmarks