What I want to do is to examine a pair of fields - lets call them F1 and F2 - both of which are select boxes and both of which can have the values of "Yes" and "No".
If F1 is set to "Yes" then F2 must be set to "No" and vice versa. Now, I could probably do this using the form name and form field names and so on via the onchange event, but it struck me that there must be some way of writing a generic script that would allow you to pass the relevant parameters and cause the setting of the companion field to be the opposite.
So, the script being called doesn't know the form name (or ID) and doesn't know the field names/ids and doesn't know the value pairs - these all being passed at onchange time.
Does anyone know how I pass the fields to the JS function? For example if I have:
but if it is a static html page then you have to hard code.