N
Nicko
Hello all,
I'm not sure if this has been posted about recently but I'm very curious
regarding a problem I came across today that I couldn't solve without
PHP. I'd like to use JavaScript because it's for an extranet application
(using IE6) that requires JavaScript anyway, so why not use it?
Anyway, I have a few inputs in an array like so:
<input name="inputArray[]" value="3">
<input name="inputArray[]" value="5">
<input name="inputArray[]" value="4">
Basically, I'd like to use JavaScript to add up all these values and get
the result (in this case, "12"). Is this possible? I tried a few
different ways but none of them worked. Do these arrays work for the id
attribute also (eg. id="inputArray[]")? If so, could I use a
getElementById("inputArray") call or something?
Thanks in advance,
Nicko.
I'm not sure if this has been posted about recently but I'm very curious
regarding a problem I came across today that I couldn't solve without
PHP. I'd like to use JavaScript because it's for an extranet application
(using IE6) that requires JavaScript anyway, so why not use it?
Anyway, I have a few inputs in an array like so:
<input name="inputArray[]" value="3">
<input name="inputArray[]" value="5">
<input name="inputArray[]" value="4">
Basically, I'd like to use JavaScript to add up all these values and get
the result (in this case, "12"). Is this possible? I tried a few
different ways but none of them worked. Do these arrays work for the id
attribute also (eg. id="inputArray[]")? If so, could I use a
getElementById("inputArray") call or something?
Thanks in advance,
Nicko.