Re: PHP & JavaScript
| From: | John Nichel | Date: | Wed, 12 Feb 2003 19:09:39 +0000 |
| Subject: | Re: PHP & JavaScript | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-135349@lists.php.net to get a copy of this message | ||
document.forms[0].elements['select1[]']
Assuming the form is your first form on the page, reference the element in JavaScript as above.
Greg wrote:
I have a problem with 2 select multiple boxes in my PHP pages. In order for PHP to pass multiple values to a page that it is posted to, the name of the select box must have [] at the end of it. My problem is that when I do that for select1[] in my page that breaks the syntax of the JavaScript code that performs operations on it. Is there any way around this? I'm looking for either a PHP or a JavaScript solution. Thanks, Greg