Hey guys. I'm working on a website and could use your help.
So I have a form. The form lists all of the users on my website, and next to each username is a pull down menu which lists that users "position" on my website. There is one pull down menu per user.
The form/pull downs are generated using PHP, so the form content (and the names of the pull down menus) is ever-changing depending on the users subscribed to my website. However, all the pulldown menus have the same basic format for their name: position_change_<username>
For example, one row of the form might have the username "aganrp6" followed by a pull down menu with the following code:
Code:
<SELECT name="position_change_aganrp6" style="background: #EABD6E;">
<OPTION value="EIC" >Editor-in-Chief<OPTION value="ME" >Managing Editor<OPTION value="SAE" >Senior Articles Editor<OPTION value="AE" SELECTED>Articles Editor<OPTION value="EE" >Executive Editor<OPTION value="EOE" >Executive Online Editor<OPTION value="SNC" >Senior Notes and Comments Editor<OPTION value="NC" >Notes and Comments Editor<OPTION value="RE" >Research Editor<OPTION value="BE" >Business Editor<OPTION value="SE" >Symposium Editors<OPTION value="Spader" >Spader<OPTION value="Alumni" >Alumni
</SELECT>
Where "aganrp6" is a user on my website.
I would like to create javascript code that identifies all of the pull down menus on the page, and makes sure at least one of the pull down menus has the value "Executive Online Editor". If none of the pull down menus have the value "Executive Online Editor", it should disable the "submit button" at the bottom of the form.
I'm not really sure where to begin with identifying all of the pull down menus, since they have ever-changing names (though they all have the same format). Help!