Re: AW: [PEAR] QuickForm: Problem enabeling and disabeling Date fields with Javascript
| From: | Ignatius Reilly | Date: | Fri, 11 Feb 2005 07:36:26 +0000 |
| Subject: | Re: AW: [PEAR] QuickForm: Problem enabeling and disabeling Date fields with Javascript | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-17490@lists.php.net to get a copy of this message | ||
Mirco Blitz wrote:
Hi Nick, Thank you very much. That really helped me out. Greetings Mirco -----Ursprüngliche Nachricht----- Von: Nick Nettleton [mailto:nick@plumdigitalmedia.com] Gesendet: Donnerstag, 10. Februar 2005 07:13 An: pear-general@lists.php.net Betreff: Re: [PEAR] QuickForm: Problem enabeling and disabeling Date fields with JavascriptAbsolutely not. The following works, and is very useful: var i = 1 ; var field = document.forms['form_name']['my_item['+i+']'] IgnatiusHello! I think javascript allows only A-Za-z0-9_ in document elements' names just like in variables.Frustratingly, PHP requires invalid form field names if you want the info to end up in an array. This JavaScript syntax seems to work ok, though: var field = document.forms['form_name']['field_name'] Best, Nick. ------------------------------- Nick Nettleton web: www.plumdigitalmedia.com -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php