minor problem with javascript and php
| From: | Jonas Jochum | Date: | Wed, 05 Jan 2000 23:31:46 +0000 |
| Subject: | minor problem with javascript and php | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-8939@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hi everybody,
I just stumbled across a little, yet quite annoying problem with
javascript and php. In php you have the ability to use arrays as input
field names (like <input type=text ... name="foo[bar]">)
Somebody probably already noticed that you cannot access that input field
with javascript. I haven't tried with IE, but Netscape under Linux returns
an error if I try to do document.forms[0].foo[bar].value = 'something',
which makes sense. Javascript regards the foo[bar] as an array and not as
a name for the field. Would it be possible to teach PHP to recognize
something like "<input ... name='foo__bar__'>" or "<input ...
name='foo__1__'>" as an array? That would make life a lot easier, at least
for me :)
- --
Regards,
Jonas Jochum
P.S.: Those from php3@lists.php.net, please cc: me, since I'm not
subscribed to that list.
commandline net services cmd:~ # Systemadministration, Netzwerkverwaltung
cmd:~ # Einrichtung von FreeBSD/Linux-Servern
cmd:~ # Datenbank/Internetprogrammierung
cmd:~ # Webdesign
tel: 07223-911794
fax: 07223-911795
web: http://www.commandline.de
mail: jj@commandline.de
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
Comment: Made with pgp4pine
iQB1AwUBOHPUZ+VY1/wBqHQBAQGRXQMAhvk8QJGmysBmKofI0neKXQ32WPw9Pgtm
DyckvgnvAYegXNCG1yToJ9y61ZJ5jcjjDqMSMWwoINUt1ZDSkHLDGFODJdWoD4lr
94NsIy24HlPGmrxloPNVxcSIF1dcP2pu
=sOlN
-----END PGP SIGNATURE-----