var f = document.forms['name_of_your_form'];
  var elmName = f.elements['data[Tag][tag_name]'];
 alert(elmName.value);

Hope this helps!

Thanks,
Mandy.

http://mandysingh.blogspot.com

On Feb 26, 11:13 am, "Zoltan" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a form with a select element like:
>
> <select name="data[Tag][Tag][]" multiple=multiple id="TagTag" > (this
> was generated via a cake bake)
>
> now what I want to do is set the elements in "data[Tag][Tag][]"  via
> links on the same page. I'd usually do this via some javascript like:
>
> document.forms[0].name[x].selected=true;
>
> the problem is I'm not sure how to call "data[Tag][Tag][]" (name in
> the above example). I don't want to change the name "data[Tag][Tag][]"
> as it seems to work fine for saving multiple elements, it's just the
> list is quite long and I'd link to have the option to set them via a
> cloud of links.
>
> Any help would be appreciated,
> Zoltan


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to