Associate
- Joined
- 28 May 2008
- Posts
- 346
I am working on an online form and there are 2 fields at different stages of the form that appear as dropdowns. Both have Yes/No options with underlying Y/N values. Basically what I want to do is add code using javascript or jQuery so that when I chose "Yes" on the first drop down it will set the option of the 2nd drop down to "Yes" also. The two fieldnames are "applicant.address" and "applicant_2"
Researching on this I found various ideas using the jQuery bind/change events and one piece of code I tried was...
also tried wrapping a div round the first field but no luck, not sure if a div structure is required here?
but truthfully even if this code was along the right lines i'm not experienced enough to know how to change things up to make this work.
Any help greatly appreciated
Researching on this I found various ideas using the jQuery bind/change events and one piece of code I tried was...
Code:
$("applicant.address").bind("change", applicant_2);
also tried wrapping a div round the first field but no luck, not sure if a div structure is required here?
but truthfully even if this code was along the right lines i'm not experienced enough to know how to change things up to make this work.
Any help greatly appreciated
