S
Sandman
Hello! I have a nice little problem 
I am using PHP to create input fields on a page, and a trick in PHP to have the
result end up in an array is to name the field like "field[foo]".
However, sometimes I need to act on these fields with a javascript, but as far
as I know, you can't do this:
<input type='text' name='field[foo]' />
<script language='javascript'>
document.form.field[foo].value = "bar"
</script>
Since that looks for the foo-entry in the field-array, right?
So how do I refer to the "field[foo]" field in a script?
I am using PHP to create input fields on a page, and a trick in PHP to have the
result end up in an array is to name the field like "field[foo]".
However, sometimes I need to act on these fields with a javascript, but as far
as I know, you can't do this:
<input type='text' name='field[foo]' />
<script language='javascript'>
document.form.field[foo].value = "bar"
</script>
Since that looks for the foo-entry in the field-array, right?
So how do I refer to the "field[foo]" field in a script?