Yeah. Sorry you got yourself in a huff over that. Let me expand slightly. The idea is to arrange the data using a model, then call the model in the controller and it will be formatted in the expected way. I believe there are actually examples of this in the bakery, and I'm sure I've seen them in PAKT Publishing's 2 or 3 CakePHP books. Or don't. It just strikes me as the "MVC" way to do it.
Cheers, Matt On Wed, Nov 3, 2010 at 9:57 PM, Dave Maharaj <[email protected]> wrote: > I think so! > > > > It has a model. Im using a jquery plugin and where the user slides > something I have a #id which corresponds to a field and a value so I want to > save it but it has no built in way to save that data so that’s what im > trying to do! > > > > So I want to mimic what that looks like. I only asked a question! If you > want to be a comic maybe you should give that a try. It is a help forum is > it not? If we were all as skilled as you then who would you insult? > > > > *From:* Matt Murphy [mailto:[email protected]] > *Sent:* November-03-10 11:21 PM > *To:* [email protected] > *Subject:* Re: Help with array > > > > Am I being moronic, everyone? > > Matt > > On Wed, Nov 3, 2010 at 9:50 PM, Matt Murphy <[email protected]> wrote: > > 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]<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]<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
