kangax, Thanks for the reply. I upgraded, changed the code a bit and got it all worked out.
BN On Apr 10, 5:18 pm, kangax <[EMAIL PROTECTED]> wrote: > > /* init section */ > > window.onload = function() { > > loadProjectControlMenu(); > > > }; > > This is actually redundant. You could assign handler to onload event > directly: > window.onload = loadProjectControlMenu; > > > > > function loadProjectControlMenu() > > { > > Event.observe('toggleStatus','click', getThis, false); > > Event.observe('toggleConstStatus','click', getThis, false); > > > } > > "useCapture" in Event.observe (last argument) is "false" by default, > so there's no need to specify that either. > > > > > function getThis(evt){ > > // this works > > el = Event.element(evt); > > // this works and returns the HTML tag > > al = Object.inspect(el); > > // this does not work no matter how I structure it > > ax = Element.identify(al); > > alert(al); > > alert(ax); > > // the goal is to substitute in the clicked element ID where 'el' is > > in the 'toggle' below.. > > //Effect.toggle(el,'slide');} > > #identify was introduced in 1.6, so you would need to upgrade first. > Also, it's a good idea to define variables as local (by prefixing them > with "var") - otherwise you might accidentally overwrite other global > variables. > > Best, > kangax --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---