For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > June 2005 > Re: [PEAR] field names with square brackets









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR] field names with square brackets
Massimiliano Arione

2005-06-08, 8:57 am

Ed Greenberg wrote:
> HTML_QuickForm seems to be taking my fieldnames and adding a pair of
> square brackets on the end. Thus


It's correct: it's needed to support the multiple choice in select.

> The problem with this is that you can't direct Javascript at
> document.formname.counties[]


AFAIR, you can do it be defining counties[] as variable.
E.g. var myvar = 'counties' + '[' + ']'; document.formname.myvar;
I'm not absolutely sure of this.
Try to take a look to HTML_QuickForm_SelectFilter, maybe you can find
something in it.
Or, of course, try to search in a javascript-related list ;-)

--
Massimiliano Arione
:: http://www.garak.it/ ::
* NO WORD * http://gnu.org/philosophy/no-word-attachments.html
* NO HTML * http://efn.no/html-bad.html
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com