note 49060 added to faq.html
| From: | alberto dot delatorre at gmail dot com | Date: | Sat, 15 Jan 2005 19:41:10 +0000 |
| Subject: | note 49060 added to faq.html | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-83339@lists.php.net to get a copy of this message | ||
Other way to make a form with array fields, and use JavaScript features on them, is use both name
and id attributes on the field as:
<input type="text" name="myfield[]" id="myfield1"/>
<input type="text" name="myfield[]" id="myfield2"/>
<script language="JavaScript">
document.getElementById("myfield1");
document.getElementById("myfield2");
</script>
This is an easy way to do it. To number the fields, do a simple for structure and you have done.
----
Manual Page -- http://www.php.net/manual/en/faq.html.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+49060
Delete -- http://master.php.net/manage/user-notes.php?action=delete+49060&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49060&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+49060&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+49060&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+49060&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+49060&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+49060&report=yes
Search -- http://master.php.net/manage/user-notes.php