I have an agent which picks up all of the documents in the database and displays them with a checkbox. The documents are categorized as such (think of - as a checkbox):
-
Operation
-
Componenet
-
Action Item
-
Action Item
-
-
When the user selects the Operation checkbox (fieldname = A), I want to select all of the corosponding Components (fieldname = A_1, A_2,…) and Action Items (fieldname = A_1_UniqueID, A_1_UniqueID,…)
I am doing this in JavaScript. My question is this - I know that if the checkbox being selected is an Operation, I need to find all of the components and action item checkboxes on the form (remember, the form was generated by an agent - so it is not really a form!) that contain the Operation name in the fieldname.
if instr(1,field,namepassed)<>0 then
check the field
How can I set this up in javascript? How can I loop through all of the fields that were generated?
Any ideas or suggestions would be greatly appreciated - thanks in advance.