fred at bitwyze.com
Fri Feb 3 15:07:18 MST 2006
On Feb 3, 2006, at 2:59 PM, TJ Hunter wrote:
>> So .. I have a form called "Cart"
>> I also have form elements with "quantity[$item_id]" as their name:
>> type="text" name="quantity">
>> probably just rename it to quantity_2 and parse the vars .. but
>> this square
>> braces method of variable passing keeps coming up a lot.
> give the element an id:
> <input id="quanity_2" type="text" name="quantity">
> document.getElementById("quanitity_2").value = "2";
I use document.forms.elements['quantity'].value;
Solves the problem and is cross browser.
More information about the UPHPU