Re: [PHP] multiselects and arrays

2001-05-11 Thread Rouvas Stathis
you can have access to everything, using the following construct: window.document.forms[i].elements[j].name and window.document.forms[i].elements[j].value so, for example : the first input text can be accessed as window.document.forms[0].element[1] while the second can be accessed as windo

Re: [PHP] multiselects and arrays

2001-05-10 Thread elias
Here if you want, you can access the names with '[]' as: _sel1 = eval("document.myform.SEL1[]"); _sel1.itemIndex .. . . . -elias ""Max Vysotskiy"" <[EMAIL PROTECTED]> wrote in message 9deame$cj3$[EMAIL PROTECTED]">news:9deame$cj3$[EMAIL PROTECTED]... > Hi. > Why doesn't PHP convert mutiselect va

Re: [PHP] multiselects and arrays

2001-05-10 Thread elias
How can i access names with '[]' w/o eval() or seeking in form's element? -elias "Rouvas Stathis" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Actually, you *can* use brackets ([]) in names and javascript can handle > them just fine. > -Stathis. > > Max Vys

Re: [PHP] multiselects and arrays

2001-05-10 Thread Toby Miller
You can use javascript with this naming convention, just not the way you're probably doing it. Here's a working example: function getValue(field) { var form = document.testform; var temp = form[field].value; return(temp); } function getArrayValue(field, index) { var form

Re: [PHP] multiselects and arrays

2001-05-10 Thread Rouvas Stathis
Actually, you *can* use brackets ([]) in names and javascript can handle them just fine. -Stathis. Max Vysotskiy wrote: > > Hi. > Why doesn't PHP convert mutiselect values with plain names (not array-like) > to arrays. Is there any reason to not doing this? > > Example: > I have a page with mul