Matt
It's your data. Make a model for it.On Wed, Nov 3, 2010 at 8:18 PM, Dave Maharaj <me@davemaharaj.com> wrote:
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.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
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
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 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:
Post a Comment