This is a simplified version of a php form with some JavaScript I'm working on. the only problem here is that the brackets in items[0][1] get parsed in the JavaScript. It works fine using items01 but I need PHP to build an array when I submit.
Does anyone know a way I can reference this field from the JavaScript while still using the brackets? I wish I could just escape them.
<pre>
<script>
function calculate() {
quant = parseInt(disttotals.scale_0.value)
item1 = (parseInt(disttotals.base_1.value) * quant)
disttotals.items[0][1].value = item1
}
</script>
Base: <input type=text size=5 value=50 name=base_1>
Quantity: <input type=text size=2 name=scale_0 onChange="calculate(0);" value=1>
Item: <input type=text name=items[0][1] size=5 value=54>
</pre>