Recent Posts by Stéphane Boisvert
|
Apr 8, 2008
Stéphane Boi...
5 posts
|
Topic: Prototype and script.aculo.us / binding? scoping? Answered it myself the offending line is this: For some strange reason I thought since I did a JSON response header that it would be automatically into a JSON array. doing an evail before the pluck solved the problem. |
|
Apr 8, 2008
Stéphane Boi...
5 posts
|
Topic: Prototype and script.aculo.us / binding? scoping?
function CreateSortableGroups(){
var url = 'controller.php?Action=GetGroupsName';
var myAjax = new Ajax.Request(url,
{method: 'get', onComplete: function (arg){
console.log('Foo1');
var GroupNames = arg.responseText.pluck('FieldGroupID');
GroupNames.each(function(n){
console.log('foo2');
var options = {
constraint: false, containment: GroupNames,
dropOnEmpty: true, onUpdate: function(list) {
var methodStart = list.down('li') ? 'remove' : 'add';
list[methodStart + 'ClassName']('FieldGroupEmpty');
}
};
console.log('foo3');
console.log(options);
Sortable.create(n, options);
})
}
}
);
}
Clarifications: (En Francais sa va etre plus facile bon) GroupNames deviens un array de ID de element ul dans le log de firebug foo1 apparait mais foo2, foo3 et la variable option n’apparaise pas. Merci pour ton temps, C’est vraiment apprécié. |
|
Apr 7, 2008
Stéphane Boi...
5 posts
|
Topic: Prototype and script.aculo.us / binding? scoping? Bonjour, I was wondering if you could help me out with a little problem. I am doing something based on the dragdrop 5 example.
function CreateSortableGroups(){
var url = 'controller.php?Action=GetGroupsName';
var myAjax = new Ajax.Request(url,
{method: 'get', onComplete: function (arg){
console.log('Foo1');
var GroupNames = arg.responseText.pluck('FieldGroupID');
GroupNames.each(function(n){
console.log('foo2');
var options = {
constraint: false, containment: GroupNames,
dropOnEmpty: true, onUpdate: function(list) {
var methodStart = list.down('li') ? 'remove' : 'add';
list[methodStart + 'ClassName']('FieldGroupEmpty');
}
};
console.log('foo3');
console.log(options);
Sortable.create(n, options);
})
}
}
);
}
Now strangely the Groups (a JSON array of IDs already Created that gets returned) get created as sortables but not with the options and foo2 and foo3 and options are not sent to the console… I<m foolish be very something to bound this i is sure><m of aware not jsut> thanks |
|
Mar 30, 2008
Stéphane Boi...
5 posts
|
Topic: Prototype and script.aculo.us / Prototype Code Insigh (auto complete, Intelisense etc) Christophe, As for the second part of my message reading it now… I have no idea what I was thinking… some strange coffee hallucination maybe…. thanks again. |
|
Mar 22, 2008
Stéphane Boi...
5 posts
|
Topic: Prototype and script.aculo.us / Prototype Code Insigh (auto complete, Intelisense etc) Good day, Thank you for a great book Christophe, Merci! |
5 posts
