Sunday, November 1, 2009

Re: Ajax.Request data handling

Ok, I figured it out. The parameter can be retrieved by using :
$this->params['form']['array structure element of the parameter'].

But how can i send extra data using This Ajax.Request?
-Armen

On Nov 1, 1:20 pm, armen <oldar...@gmail.com> wrote:
> Hey everyone,
> I cant figure out how to retrieve a value sent via Ajax.Request
> function in prototype. for example I have a function like so:
>
>                         function send(event) {
>                           new Ajax.Request(
>                                         <?php echo "'". $html->url(array(
>                                         "controller" => "users",
>                                         "action" => "add")) . "'";?>
>                                 ,{
>                                 parameters: event.memo,
>                                 onComplete: function(xhr) {
>                                   // optional callback
>                                 }
>                           });
>                         }
> Which calls the users/add function. How do i retrieve the event.memo
> data in my controller function?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: