Re: Great javascript function

From: Date: Thu, 28 Dec 2000 19:39:41 +0000
Subject: Re: Great javascript function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32133@lists.php.net to get a copy of this message
On Thu, 28 Dec 2000, Anthony Martin wrote: > Ever use associative arrays to name a form element? > > <INPUT type="submit" name="doThis[foo]" value="Do Foo"> > > Ever try to use that name with javascript? > > alert ( document.myform.doThis['foo'].value ) ; > > It doesn't work. Or at least, I don't see how it would. The brackets are > Quick question: What's wrong with document.myform["dothis[foo]"].value? -- Ignacio Vazquez-Abrams <ignacio@openservices.net>

« previous php.general (#32133) next »