array[] and Javascript.

From: Date: Fri, 25 Jan 2002 02:54:51 +0000
Subject: array[] and Javascript.
Groups: php.general 
Request: Send a blank email to php-general+get-82055@lists.php.net to get a copy of this message
Hi list, I have a little problem here. I need data from a HTML multiple select box passed to PHP. Ok, that's really easy, just put name="array[]" like this: <select name="array[]"> <option value="1">Alabama</option> ... </select> But then, I *need* to access that select and its elements and properties with Javascript (something like document.forma.array[].somethingelse), but the [] brackets are not accepted (syntax error). Is there any other way to access the data from a multiple select box in PHP without using the [] in the name in HTML?. Or, on the other hand, is there any way to make the array[] work in Javascript?. Any help is *really* appreciated. Thanks a lot. Rodolfo.

« previous php.general (#82055) next »