Multiple select name in combination with javascript (dom)
| From: | Dominick Vansevenant | Date: | Fri, 13 Oct 2000 13:30:39 +0000 |
| Subject: | Multiple select name in combination with javascript (dom) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-20001@lists.php.net to get a copy of this message | ||
Hello,
To handle data from a multiple select form the php manuals advice to use a
name for that multiple select box that has [] at the end like status_list[]
(<SELECT size="8" COLS="30" name="status_list[]" DISABLED>).
If you do just normal handling with php, you can get the content because the
name tells php it is an array.
The problem with this however is that javascript/dom does not allow these []
because it thinks it is an array and does not want to accept this even with
brackets:
document.tform.status_list[].options.add(newElem2);
Can anyone help me out?
Thanks,
Dominick