Richard Quadling wrote:
> ...
>
>       $(s_Form)
>               .getElements()
>               .without
>                       (
>                       $(s_Key),
>                       $(s_Form)
>                               .getElementsBySelector
>                                       (
>                                       'input[type=reset]'
>                                       )
>                               .first(),
>                       $(s_Form)
>                               .getElementsBySelector
>                                       (
>                                       'input[type=submit]'
>                                       )
>                               .first()
>                       )
>               .invoke('observe', 'blur', keyEdited)
>               .invoke('observe', 'change', keyEdited);
>
> is working, but could it be made any neater?
>
>   
You could do one of two things: add a "keyEdited" class to all those you 
want to observe, then simply call $$('.keyEdited').invoke(...) or you 
could do a more complicated CSS selector using ":not()".  Maybe 
something like the following:

$(s_Form)
  
.getElementsBySelector('*:not(input[type=reset]):not(input[type=submit]):not(#' 
+ $(s_Key).id + ')')
  .invoke(...)


- Ken







--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to