Determining the visibility of an HTML element on the server side
1 answer
The short answer is, "No, you can't."
Long answer: if you are absolutely sure that the visibility of this element can only be changed with CSS, then you can parse all applicable CSS files. It's quite difficult, but possible.
However, in real life, you also need to know the exact version of the browser (due to possible CSS hacks and hence differences in behavior), and it is not uncommon for the visibility of elements to switch via javascript.
Update (based on OP's clarification): I would strongly suggest using hidden field ( <input type="hidden">
) to define visibility as you described. The hidden field value can be changed with javascript as the radio group value changes.
+1
source to share