Thanks a lot Fábio.
I just found a simiular way witch works to:
complain.erase(parseInt(element.get('id')));On 16 Apr., 14:09, Fábio M. Costa <[email protected]> wrote: > An id should start with a word. But still you should transform your id to an > int before trying to erase it. > > complain.erase(element.get('id').toInt()); > > -- > Fábio Miranda Costa > Solucione Sistemas > Engenheiro de interfaces > > > > On Fri, Apr 16, 2010 at 8:45 AM, hamburger <[email protected]> wrote: > > Hello i need help with erasing an array from a list. > > I do not understand why it is not working. > > > var complain = []; > > > complain.push(bildID); //works fine console.log shows: [1002, 1005, > > 1003, 1001] > > > var element = new Element('li', { > > 'id': bildID, > > 'html': complaintext > > }).inject('complainContainer','top'); > > > element.addEvent('click', function(event) { > > complain.erase(element.get('id')); //do not work > > element.dispose(); //works > > fine > > alert("delete: " + element.get('id')); // it shows > > the right ID > > }); > > > ... > > > thanks in advance for any help > > > -- > > Subscription settings: > >http://groups.google.com/group/mootools-users/subscribe?hl=en- Zitierten > >Text ausblenden - > > - Zitierten Text anzeigen -
