I have an html page that I can configure for three different levels of detail, involving some elements marked with class="basic", some elements marked with class="full", and all the rest unmarked. The minimal configuration, by putting "display: none" in the CSS for both of these classes, displays only that which is unmarked. The configuration that I'd like to have as the default displays some but not all of the marked elements, by putting "display: inline" in the CSS for the "basic" class, but still "display: none" in the CSS for the "full" class. And then the fullest configuration displays everything, both marked and unmarked elements, by putting "display: inline" in the CSS for both the "basic" and "full" classes. So far, so good. This much is working fine. I can choose the display mode I want by manually editing the CSS.

What I'm lacking that I don't know how to accomplish - is making a way for the person viewing the webpage to readily choose which of these display modes he wants. I've seen some discussion online of doing such things by passing a parameter from the URL, with this also involving javascript, but I haven't succeeded in getting this to work. So - what are some good ways to allow the user to specify which of these display modes he wants? A working solution for passing a parameter from the URL might do it. Or I'd be happy for some other approach that I haven't yet heard about - whatever would be most straightforward for the users.

Allan's user avatar

New contributor

Allan is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.