undefined
Dynamic forms into Javascript objects?
Fri, Jan 4, 2013 at 9:40 AM by Dave Winer.
I have a JavaScript question today.
I have a form with lots of input elements whose names I can't hard-code into the JavaScript. I have to be prepared for anything that might be there.
On a certain event I want to grab the values of all the input elements and put them into a JavaScript object, each as a property, with the name of the input becoming the name of the property.
-
Now, I have a global called myValues that I want to get all the values from the inputs into.
-
I've looked at various Stack Overflow pages, of course.
Any help much appreciated!
-
Here's the actual test app.
-
Still getting my wobbly JS sea legs to settle down. :-)
Thanks for all the help!!