heres my code:
echo $ajax->link($html->image("/images/units/".$unit['Unit']
['race']."/".$unit['Unit']['unit'].".gif",array('class' =>
'builder_icon')),
array('controller' => 'units',
'action' => 'getUnits', $unit['Unit']['id']),
array('update' => 'builder', 'escape'
=> false,
'before' => '
var notes = new Array
();
if(document.build_form)
{
for(var i=0; i
< document.build_form.elements.length;i++){
if
(document.build_form.elements[i].name.substr(0,4) == "note"){
notes.push(document.build_form.elements[i].value);
}
}
}
notes.reverse();
nums.reverse();
'));
On May 14, 10:23 am, Jared <[email protected]> wrote:
> Thanks for the response, but how do you append to a form with
> javascript?
>
> On May 14, 1:00 am, "Dr. Loboto" <[email protected]> wrote:
>
> > Append collected data to form as hidden inputs with cake-style names.
> > You'll receive it in $this->data
>
> > On May 14, 11:48 am, Jared <[email protected]> wrote:
>
> > > I want to analyze some forms in the 'before' code execution of my ajax
> > > call, then pass the collected data to my controller action to decide
> > > what to do. How can I do this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---