Hi,
On Jan 10, 7:08 pm, bill <will...@techservsys.com> wrote: > DJ Mangus wrote: > > What is returned is the same thing you'd get if you used $('id'). > > Chain on .identify to get the Id from a DOM node. > > Thank you. > as in: > > function clickHander (event) { > var id = event.element().identify ? > > or rather: > function clickHander (event) { > var element= event.element() > var id = element.identify() The latter, since #identify is a function. (Don't forget your semicolons, though!) FYI, Tobie says that Event#element is deprecated and we should use Event#findElement with no arguments instead, so: function clickHandler(event) { var id = event.findElement().identify(); } Also note that if you know the element will have an ID, or if you don't care if it doesn't, you can just use the `id` property. Element#identify just returns `id`, but it checks first to see if the element *has* an ID and if not it assigns one to it. HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / com www.crowdersoftware.com
-- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.