SOLVED: Re: [Phplib-users] When [] in OOHForm element, cannot use javascript
Brought to you by:
nhruby,
richardarcher
|
From: Ernest B. <Er...@Be...> - 2003-07-22 15:33:39
|
Well, I've found out, direct addressing of elements which contains '['
in their names cannot be done in javascript. However, one can use
indirect addressing like document.form.elements[17], which isn't
bulletproof, but it works.
have a nice day
Peter Termaten wrote:
> Try this:
>
> $f->add_element(array("type"=>"checkbox",
> "name"=>"test",
> "multiple"=>1));
>
>
> The 'multiple' makes that 'name' can be accessed as an array. No need
> to use the brackets [].
>
> Peter
>
> A t 00:44 06-07-2003, Ernest Beinrohr wrote:
>
>> Hi, I am using ooh forms checkbox elements. It's a multiline
>> same-named checkbox. I had to use for it's name something like
>> "name"=>"test[]", so that PHP recognizes it as multiple value.
>>
>> But, I cannot access that element from javascript. Until now I used,
>> document.formname.element[i] , but I cannot do this with the
>> brackets in element name. Does anyone has a solution ?
>>
--
Ernest Beinrohr, OERNii
eAdmin @ axonpro.sk, http://www.axonpro.sk/
+421-2--6241-0360, +421-903--482-603
HomePage: http://www.OERNii.sk/ ICQ: 28153343
-----
Opportunity is missed by most people because it is
dressed in overalls and looks like work.
- Thomas Edison
|