How can I get to know in CGI script if an element in the Javascript is disabled.

I have disabled dropdown values whose values doesn't get passed on Submit. I can make these values equal to 1 if I could know if they are disable.

I have already tried enabling the elements on submission and disabling again, it works but I do not want to use this method as it doesn't give a good view to use.

Further, editing my question, is there a way I can have a variable common(global/sahred) between JS and CGI?