Ok, i appreciate the help so far. Let me try to explain once more.
i call a table within mysql and output each row using a while loop into table rows
one of the elements within each row of the table is a textfield which i have named as if they were an array (tF[0], tF[1]...)
I would like my javascript to listen to all of the textfields in the entire table without having to enter
Code:
Event.observe('tF[]','change', updateCart, false);
as mentioned above for each textfield because i will never know how any tF[]'s there actually are because it will all depend on the mysql_query
is there anyway i can make it listen to all of the tF[]s dynamically without having to add the Event.observe() function for each array.
i dont want to have to do this
Code:
Event.observe('tF[0]','change', updateCart, false);
Event.observe('tF[1]','change', updateCart, false);
Event.observe('tF[2]','change', updateCart, false);
Event.observe('tF[3]','change', updateCart, false);
...
Event.observe('tF[n]','change', updateCart, false);
Thanks again for the help. I hope the explanation is better.
Bookmarks