It's your data. Make a model for it.
On Wed, Nov 3, 2010 at 8:18 PM, Dave Maharaj <[email protected]> wrote:
> Does anyone know how to manually create an array in js that would mimic
> the data sent normally?
>
> I simply need to send off 1 key => value pair so it looks like
> data[‘model’][‘field’] => 0 since that is what the controller is expecting
>
>
>
> Not using a form as what is being done is not possible….
>
>
>
> The js has field value passed to it…just cant seem to get the array right.
>
>
>
>
>
> SCRIPT (NOT CONTROLLER)
>
> function update ( field , value ) {
>
>
>
> var user_data= new Array()
>
> ????
>
>
>
> $.ajax({
>
> type: "POST",
>
> cache:false,
>
> url: '/user/update',
>
> data: user_data
>
> });
>
> }
>
>
>
> Thanks,
>
>
>
> Dave
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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]<cake-php%[email protected]>For
> more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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