On Sep 24, 1:06 am, Mardo <[EMAIL PROTECTED]> wrote:
> Does anyone know how I could get all the textbox's with a
> name='PaymentAmount' and background color of blue?
>
> I would like to enumerate these and get the total.
>
> Any help would be much appreciated.
$$('[name="PaymentAmount"]) will return you a Prototype Array of all
the elements with that name. (If you want to restrict it to textboxes,
you could use
'input[type="text"][name="PaymentAmount"]'.
I'm not sure about the background colour, since a) that is not a
attribute, but part of the value of an attribute, and b) 'blue' is not
a real value.
I suspect you need something like
$$('[name="PaymentAmount"]').findAll(function(e) {e.style.background-
color == #0F0})
but I'm not sure of the syntax for colour values. Also, this will
match only specifically the fully-saturated monochromatic blue.
Colin
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---