Forum: Rails Engines Problems with prototype and IE

Posted by Guillo Guillote (guillefar)
on 2006-11-14 18:55
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)
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.