I'm trying to use identify() to get the clicked element ID to pass to the toggle function.. it errors with 'does not support this property or method'
This isn't final code, I'm just trying to get it to work. Thanks in advance for your time and help. - Brent N. ------------------------------------------------------------------------------ Browser: IE6 Prototype lib ver: 1.5.1.1 ------------------------------------------------------------------------------ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <script type="text/javascript" src="../scripts/prototype.js"></script> <script type="text/javascript" src="../scripts/scriptaculous.js"></ script> /* init section */ window.onload = function() { loadProjectControlMenu(); }; function loadProjectControlMenu() { Event.observe('toggleStatus','click', getThis, false); Event.observe('toggleConstStatus','click', getThis, false); } 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'); } </head> <body> <div id="controlStatus"> <p id="toggleStatus">Status -</p> <div id="interfaceStatus" style="display:none;"><div> stuff here </div></div> </div> <div id="controlConstStatus"> <p id="toggleConstStatus">Construction Status -</p> <div id="interfaceConstStatus" style="display:none;"><div> stuff here </div></div> </div> </body> </html> --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] 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 -~----------~----~----~----~------~----~------~--~---
