Hi,
This may be a really simple solution; I'm not sure, as I'm new to javascript.
I have a form with a bunch of hidden inputs, that are generated based on a MYSQL database (a couple hundred entries). For example:
PHP Code:
<input type=hidden name=mass[123] value=0>
When the user inputs a value into a text input and clicks a button, I want the page to store the value of the text input to the hidden input. I can get the page to forward the variable, containing the number of the field (eg: 123), but can't seem to get it to alter the input.
Currently I have:
PHP Code:
function addMass(id) { var form = document.recipe.mass[id]; form.value = document.formMass.mass.value; }
Does anyone know a) why this isn't working and b) how I can change it so it does work?
Thanks in advance; any help is appreciated.
Scott
|