[Proto-Scripty] Re: Updating List - Issue with implementation

2009-02-23 Thread vanq69
Many thanks for your help, this is all working now. On Feb 23, 7:55 pm, Walter Lee Davis wrote: > You know, I think this really should be > > + Sortable.serialize("chunksList",{name:'order'}) + > > Sortable.serialize already puts the key/value pair together for you. > > Walter > > On Feb 23, 200

[Proto-Scripty] Re: Updating List - Issue with implementation

2009-02-23 Thread Walter Lee Davis
You know, I think this really should be + Sortable.serialize("chunksList",{name:'order'}) + Sortable.serialize already puts the key/value pair together for you. Walter On Feb 23, 2009, at 2:47 PM, Walter Lee Davis wrote: > "&order=" + Sortable.serialize("chunksList") + --~--~-~--~--

[Proto-Scripty] Re: Updating List - Issue with implementation

2009-02-23 Thread Walter Lee Davis
On Feb 23, 2009, at 1:12 PM, vanq69 wrote: > "&order=" + {order:Sortable.serialize("chunksList")} + Simplify! "&order=" + Sortable.serialize("chunksList") + That should fix that part. (You were mixing hash syntax with string syntax.) You've also got a ton and a half of redundant code on th

[Proto-Scripty] Re: Updating List - Issue with implementation

2009-02-23 Thread vanq69
Thanks yet again for you taking the time to assist me, this is proving to be most frustrating for me (and for yourself I imagine!) as I just cant seem to get this working :( Im going to (hopefully) lay out the code step by step, and perhaps if you have the time then you can tell me where im wrong

[Proto-Scripty] Re: Updating List - Issue with implementation

2009-02-23 Thread Walter Lee Davis
This was working previously because you were using a different data model for the return value of your serialise() method. Sortable.serialize() returns an array as a single value, and if you add that to the GET that is sent to your server, it will be interpreted by PHP on the receiving end

[Proto-Scripty] Re: Updating List - Issue with implementation

2009-02-23 Thread vanq69
Thanks again for your help. I have spent the last hour reading through the documentation and working through the example and also your notes. I believe I am getting closer, but I did not understand how your: //php foreach($_POST['order'] as $k=>$v){ if($item = ActiveRecord::FindById('it

[Proto-Scripty] Re: Updating List - Issue with implementation

2009-02-23 Thread Walter Lee Davis
sorry, this part should have been var foo = Sortable.create('chunksList',{}) //no need to tell it tag:li -- it's the default Walter On Feb 23, 2009, at 8:33 AM, Walter Lee Davis wrote: > var foo = Sortable.serialize('chunksList',{}) //no need to tell it > tag:li -- it's the default --~--~

[Proto-Scripty] Re: Updating List - Issue with implementation

2009-02-23 Thread Walter Lee Davis
This part is duplicating built-in functionality. Read up on Sortable.serialize (with a z) in the Wiki. It's very powerful and configurable. var foo = Sortable.serialize('chunksList',{}) //no need to tell it tag:li -- it's the default ...time passes... var fooOrder = foo.serialize(); The

[Proto-Scripty] Re: Updating List - Issue with implementation

2009-02-23 Thread vanq69
Thanks for the help firstly :) It does clarify, I know that "chunksList" needs to go in serialise (content) - I think, just not sure how to access that in the script. Here is the parts of the code, its possible I have made an error: from the script: function startup() { Sortable.create

[Proto-Scripty] Re: Updating List - Issue with implementation

2009-02-23 Thread Walter Lee Davis
content.serialize() could be re-written as "variable you set to the return of Sortable.create".serialize(); var foo = Sortable.create('somDomElement',{}); ... var sortOrder = foo.serialize(); Does that help? Walter On Feb 23, 2009, at 7:00 AM, vanq69 wrote: > > ANY help would be greatly