# Problems with prototype and IE

**URL:** <https://www.ruby-forum.com/t/problems-with-prototype-and-ie/75961>\
**Category:** Engines\
**Created:** [November 14, 2006, 6:55pm UTC](https://www.ruby-forum.com/t/problems-with-prototype-and-ie/75961 "2006-11-14T18:55:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![guillefar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/d26b3c/32.png) [@guillefar](https://www.ruby-forum.com/u/guillefar)\
**Post date:** [November 14, 2006, 6:55pm UTC](https://www.ruby-forum.com/t/problems-with-prototype-and-ie/75961/1 "2006-11-14T18:55:59Z")

</div>

Hi all, i have this problem, and i dont know how to avoid it:  
In a sortable element made with a foreach loop, im using something like:  
Event.observe(â€˜buttonâ€™, â€˜clickâ€™, function(e){  
alert(this.getattributes(â€˜nameâ€™)) } );

where name is actually a counter of the loop.  
The problem is that i need a element that being click execute a function  
who pass a variable, and this variable depends of the context. Ex:  
[button 1],name:â€1â€, function: delete(1)  
[button 1],name:â€2â€, function: delete(2)  
[button 1],name:â€3â€, function: delete(3)  
[button 1],name:â€4â€, function: delete(4)… and so

This works great in Firefox, so i can get any attribute of the dom  
elements where the function (in the above example, â€œalertâ€) is.  
But in IE dont work in any way.  
Do you have any suggestions?  
Thanksâ€¦

PD. On click events dont work, cause the elements are in a sortable (or  
at least, i dont know how to do it)
