This is how I made a few controls draggable, destroyed them as
required:
var draggable = [];
// adding draggables
function addDraggables() {
var i = 0;
// get all elements inside div ''group1'' having a
classname
''lineitem'' and make them draggable
$A($(''group1'').getElementsByClassName(''lineitem'')).each(
function(item) {
draggable[i] = new Draggable(item,{revert: true,
ghosting: true});
i++;
}
);
}
// destroying draggables
function destroyDraggables() {
$A(draggable).each(
function(item) {
item.destroy();
}
);
}
Above javascript code is used in an .ASPX page and contents inside div
''group1'' are populated dynamically on each postback. I use
destroyDraggables() to destroy all existing draggables before adding
or recreating draggables with addDraggables(). In firefox this setup
works fine, but in IE7 after first drag and drop things will start
failing, and it throws an error "Unspecified error at 3087".
What should I do to get rid of this error scenario in IE7?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
Any takers? On Jul 23, 8:45 am, Peringz <peri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> This is how I made a few controls draggable, destroyed them as > required: > > var draggable = []; > > // adding draggables > function addDraggables() { > var i = 0; > // get all elements inside div ''group1'' having a classname > ''lineitem'' and make them draggable > $A($(''group1'').getElementsByClassName(''lineitem'')).each( > function(item) { > draggable[i] = new Draggable(item,{revert: true, > ghosting: true}); > i++; > } > ); > } > > // destroying draggables > function destroyDraggables() { > $A(draggable).each( > function(item) { > item.destroy(); > } > ); > } > > Above javascript code is used in an .ASPX page and contents inside div > ''group1'' are populated dynamically on each postback. I use > destroyDraggables() to destroy all existing draggables before adding > or recreating draggables with addDraggables(). In firefox this setup > works fine, but in IE7 after first drag and drop things will start > failing, and it throws an error "Unspecified error at 3087". > > What should I do to get rid of this error scenario in IE7?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---