I am developing a website utilizing PHP, MYSQL and jquery.
In one particular form, you have a select box to choose your ticket type.
Depending on your ticket type you then get 4 extra options.
These options are displayed using jquery, and show/hide a div.
If you change your option back, then the values of the extra options are set to ‘NO’, and the division hidden.
The problem occurs when a user does not have javascript on. If they have javascript disabled, the four extra options are always displayed meaning the user can set these options without being required to even select a ticket, or more likely when selecting an incompatible ticket.
The functionality relies on javascript, and adding none-javascript functionality is excessively complex.
I know there is a large debate about whether sites should have none-javascript versions. Could someone perhaps state their thoughts on this particular situation?
Thanks
Design your UI in such a way that, even if the user has Javascript disabled and all options are visible, it is clear to the user what to do.
Next, once the user submits the form, do a server-side check on the submitted data. For example, if the first select box has no value, return to the form and display an error message accordingly. Or if the first select box did have a valid value, pick the correct second select box to check.
Note that you would have to do the server-side validation anyway, so in theory, this should be no extra work.