Click here for our complete list of Stupid Web Tricks.
One of the goofiest things about Web-based questionnaires is that, on most of them, the questions are totally unrelated to one another. One example of this goofiness is medical questionnaires—how can they ask me my gender on question three and then on line twenty-three, ask if I'm pregnant or might be pregnant? What these questionnaires need is a way to base future questions on past results.
The example in Listing A illustrates some of the ways that the display property can be used to avoid those embarrassing questions. Elements are displayed, or not, based upon the client's input.
Click here to see it in action.