Re: QF: setMultiple changes the name of my select
| From: | Alexey Borzov | Date: | Fri, 10 Mar 2006 18:25:20 +0000 |
| Subject: | Re: QF: setMultiple changes the name of my select | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-23267@lists.php.net to get a copy of this message | ||
Hi,
Damien Cros wrote:
Yes I want to remove the [] I have some javascript and document.forms[0].myselect[] doesn't work whereas document.forms[0].myselect does.Looks like you don't know javascript, either. Use document.forms[0]['myselect[]'] or better yet, add an 'id' attribute to the select in question and use document.getElementById(...)
I'm confused...why do you want to remove [] w/ a multiple select? I was under the impression that to retrieve the data from a multiple select on a form submission (at least for POST) the POST variable had to be an array like this. If you remove the [], can you retrieve the multiple selections?