You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Vlad Golodov <vl...@top.ee> on 2005/03/17 12:08:58 UTC

[SOLVED] Re: get an array from cocoon request

Thanks all,

problem is solved by leaving brackets off
<input type="checkbox" name="groups" value="{groupId}"/> <xsl:value-of
select="groupName"/>

and collecting an array this way
var groups = cocoon.request.getParameterValues("groups");

Vlad

"Gertjan Assies" <ge...@assies.nu> wrote in message
news:42394CD7.6090901@assies.nu...
> I dont think the brackets should be in the name of the input element
> the request object takes the input elements with the same names and
> returns those as an array with the getParameter
>
> try
>
> <input type="checkbox" name="groups" value="1"/> group 1
>
> cheers,
> Gertjan
>
> Vlad Golodov wrote:
>
> >Hi!
> >
> >was trying for a while to get an array from cocoon request in a JS flow.
I
> >don't use CForms.
> >
> >Such code is submitted:
> ><input type="checkbox" name="groups[]" value="1"/> group 1
> ><input type="checkbox" name="groups[]" value="2"/> Group 2
> ><input type="checkbox" name="groups[]" value="3"/> Group 3
> >
> >In JS I was trying to get it in ways:
> >var groups = cocoon.request["groups"];
> >var groups = cocoon.request.groups;
> >var groups = cocoon.request.getParameter("groups");
> >
> >Any ideas what could be wrong?
> >
> >Thanks in advance,
> >
> >Vlad
> >
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> >For additional commands, e-mail: users-help@cocoon.apache.org
> >
> >
> >
> >
> >




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org