Wednesday, November 3, 2010

Re: Help with array

Wouldnt this work? Havent tried.

var data = { Model: { username: 'miles'; } }

On Nov 3, 6:57 pm, "Dave Maharaj" <m...@davemaharaj.com> 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:mattyh...@gmail.com]
> Sent: November-03-10 11:21 PM
> To: cake-php@googlegroups.com
> Subject: Re: Help with array
>
> Am I being moronic, everyone?
>
> Matt
>
> On Wed, Nov 3, 2010 at 9:50 PM, Matt Murphy <mattyh...@gmail.com> wrote:
>
> It's your data.  Make a model for it.
>
> On Wed, Nov 3, 2010 at 8:18 PM, Dave Maharaj <m...@davemaharaj.com> 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 sitehttp://cakeqs.organd 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
> <mailto:cake-php%2Bunsubscribe@googlegroups.com>  For more options, visit
> this group athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 athttp://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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate