Hi,
I'm trying to sweeten up my syntax a bit. I've been playing around
trying to work out how to do something with Selector, maybe someone
can help me.
I want all form elements for a form which aren't disabled, hidden,
type="button" or type="submit". basically all visible editable fields.
Obviously i could just do
Form.getElements( 'myForm' ).findAll( function(e){ return !(e.disabled
|| ['hidden', 'button', 'submit'].include( e.type ) ); } );
I could make that look a little nicer by defining that predicate
somewhere and just passing it in to findAll.
I just thought that using a Selector might be nicer but i haven't
found an expression that works. first attempt was
"select,
input:not(disabled):not(type=hidden):not(type=button):not(type=submit)"
including variations like @type and [] notation.
Please can someone help me out.
Thanks in Advance
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---