I am having a problem with Lowpro.js Event.addBehavior not passing the element on to my function on IE. It works fine on Firefox and Safari... Event.addBehavior({ "#nav a:click" : function(event) { test(this); } }); var test = function(foo){ alert(foo.id); } On IE I get "undefined" Any ideas why? ______________________________________________________________________ Alex Duffield ❖ Principal ❖ InControl Solutions . http:// www.incontrolsolutions.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Im still bashing my head against the wall on this one.. I have set up a minimized test page here: http://www.galianoliving.com/lowtest.php Lowpro.js is version 0.04 Prototype.js = 1.5.1 Any help you can offer would be greatly appreciated!!! ______________________________________________________________________ Alex Duffield ❖ Principal ❖ InControl Solutions . http:// www.incontrolsolutions.com On 6-Jul-07, at 12:26 PM, Alex Duffield wrote:> I am having a problem with Lowpro.js Event.addBehavior not passing > the element on to my function on IE. It works fine on Firefox and > Safari... > > Event.addBehavior({ > "#nav a:click" : function(event) { test(this); } > > }); > > var test = function(foo){ > alert(foo.id); > } > > On IE I get "undefined" > > Any ideas why? > > > ______________________________________________________________________ > Alex Duffield ❖ Principal ❖ InControl Solutions . http:// > www.incontrolsolutions.com > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
OK, still no love passing the "THIS" keyword with Event.addBehavior, but passing the actual event does work.. and I can get my element out of that... Event.addBehavior({ "#nav a:click" : function(e) { test(e); } }); var test = function(e){ alert(Event.element(e).id); } But as much as I can use this to solve my current dilemma, it seems from the samples Dan has on the lowpro page you should be able to use "THIS"... Event.addBehavior({ ''div.feature:mouseover'' : function(e) { this.hide(); } }); But that code still fails on IE ...> http://www.galianoliving.com/lowtest.php______________________________________________________________________ Alex Duffield ❖ Principal ❖ InControl Solutions . http:// www.incontrolsolutions.com On 7-Jul-07, at 10:03 AM, Alex Duffield wrote:> Im still bashing my head against the wall on this one.. > > I have set up a minimized test page here: > > http://www.galianoliving.com/lowtest.php > > Lowpro.js is version 0.04 > Prototype.js = 1.5.1 > > > Any help you can offer would be greatly appreciated!!! > > > > ______________________________________________________________________ > Alex Duffield ❖ Principal ❖ InControl Solutions . http:// > www.incontrolsolutions.com > > > > On 6-Jul-07, at 12:26 PM, Alex Duffield wrote: > >> I am having a problem with Lowpro.js Event.addBehavior not passing >> the element on to my function on IE. It works fine on Firefox and >> Safari... >> >> Event.addBehavior({ >> "#nav a:click" : function(event) { test(this); } >> >> }); >> >> var test = function(foo){ >> alert(foo.id); >> } >> >> On IE I get "undefined" >> >> Any ideas why? >> >> >> _____________________________________________________________________ >> _ >> Alex Duffield ❖ Principal ❖ InControl Solutions . http:// >> www.incontrolsolutions.com >> >> >> >> >> >> > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---