Forms with Field Arrays and JavaScript

From: Date: Fri, 12 Jan 2001 20:50:40 +0000
Subject: Forms with Field Arrays and JavaScript
Groups: php.general 
Request: Send a blank email to php-general+get-34294@lists.php.net to get a copy of this message
Hi! I was wondering if someone knows, or can think of a way to go around this problem i have. The thing is i am working with a form with a field array. Each field is something like: <input name="myfields[]" type="text"> When i receive the posted data, I can access the "myfields" array. This is fine. The problem is within my form i have client JavaScript code to validate the form data. But I can't make reference to a form object called myfields[] or myfields[5] or just myfields. The property name of the javascript object is set to "myfields[]", but reference to myfields[][5] or document.myform.fields["myfields[]"] doesn't work either. Any suggestions will be greatly appreciated. Thanks in advance.

« previous php.general (#34294) next »