Hi. Brain has gone to sleep.
I've got a form where I'd like to be able to allow some controls to be disabled by a checkbox. Working code ... <script type="text/javascript"> function handleHideClick(ev) { hideClick(ev.element()); } function hideClick(el) { el.up('tr').select('input[type=text]') .each ( function(el2) { el2.disabled = el.checked; } ); } document.observe('dom:loaded', function(ev_dom_loaded) { $$('.dtl_Blank input[type=checkbox]').each(function (el) { hideClick($(el).observe('click', handleHideClick)); }); }); </script> Is there a way to simplify this? I initially thought that Element.fire() would help, but that is for custom events only. Essentially, whilst setting the click handler, I want to be able to call the handler also. Regards, Richard. -- ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling -- 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.