JS & PHP - Change dropdown value if other fields are filled
<p>I have a PHP application form for medical health plans where the user fills in his details and selects some options from various controls, one of which is the plan type (private of family plan). Sometimes, although the user fills in his siblings/spouse details, they forget to also select the 'family' option and leave the drop down at it's default value which is the 'private' plan. </p>

<p>How can I make sure that if the user fills in his sibling's details, that the 'plan' dropdown will change to the proper option? I know this can be done easily with js but I'm not sure what event I should call it on, <code>onFocus</code> and <code>onClick</code> won't work because the user might simply click on the <code>Sibling Name</code> field but not enter a value, fill in something but later on clear it out etc.</p>

<p>I think that a script that counts the length of the 4 available siblings fields and if one of them is not empty, then change the 'plan' select value from 'private' to 'family'.</p>

<p>Any ideas would be great, thanks.</p>
