Javascript and Dynamic Form elements with PHP
| From: | Joao Prado Maia | Date: | Wed, 09 Aug 2000 22:29:07 +0000 |
| Subject: | Javascript and Dynamic Form elements with PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-11005@lists.php.net to get a copy of this message | ||
Hello everyone,
I have a little problem here that maybe has no solution, but maybe someone
already created a work-around for this, so here it goes:
I'm trying to create dynamic form field elements, specifically text
fields, and create them as arrays so I can just loop thru all of them and
get their values, if any.
Anyway, I have all of these form fields, named "friend_name[]" and I have
to use Javascript now to create a dynamic pop-up window and document.write
to that window using this text field value.
The problem is that I just can't use the field name on my Javascript code
because it breaks it. The object name "friend_name[]" is invalid.
How can I create a work-around for that ? I mean, a work-around that
doesn't require me to change the field name to "friend_name_1" or
whatever, because I don't want something like that.
Joao
--
Joao Prado Maia
Web Developer
Kefta.com, Inc