Try this:
$('myForm').select('input[id^="act"], select[id^="act"]').invoke
('enable');
Remember, any valid CSS3 selector can be used in the select() method.
You can make it as precise as you like, and you don't have to worry
if the browser does CSS3 or not, since it's all managed in Prototype.
Walter
On May 6, 2008, at 6:42 PM, xzyfer wrote:
>
> hey guys,
>
> i have a page in which i disable a form:
>
> $('myForm').diable();
>
> Then i need to enable only form elements who id begins with 'act':
>
> $('myForm').select('*[id^="act"]').invoke('enable');
>
> the problem is that the select also returns elements such as links
> ('a') whose ids also begin with 'act'.
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---