Each IE problem

2 views
Skip to first unread message

Celso

unread,
Jul 6, 2009, 10:00:06 AM7/6/09
to Prototype & script.aculo.us

Why this only works in Firefox and not in IE?

$$('input').each(function(e){
if(e.type == 'checkbox' && e.checked)
$('tr-'+e.id).morph('checked');
});

Thanks,
Celso

ColinFine

unread,
Jul 9, 2009, 9:11:51 AM7/9/09
to Prototype & script.aculo.us
*Please* don't say "doesn't work" or equivalent. That tells us
nothing. What actually happens?

That code looks OK to me, but are you sure that the 'tr'+id id's exist
and are unique?

Colin

Walter Lee Davis

unread,
Jul 9, 2009, 9:32:37 AM7/9/09
to prototype-s...@googlegroups.com
You could maybe do something less dependent on the local structure,
using up():

$$('input[type="checkbox"]:checked').each(function(e){
e.up('tr').morph('checked');
});


Walter
Reply all
Reply to author
Forward
0 new messages