• I want to code a responsive checkbox table in a form.

    I coded it by reading from a database to a php variable, and generating the table of checkboxes with javascript, and regenerating it from the php variable on resize.

    So far so good….

    But then my boss tried to click a few check boxes on his ipad and swiveled it round, changing the resolution, refreshing, but losing the added check box values (as it read from the initial php variable).

    Maybe I should save the db values to a session, update the screen from the session, and on change of any checkbox, update the session (javascript or ajax php?), and then read the session back on resize.

    Is this the best way to do this?

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    You may want to avoid using your boss as an alpha/beta tester in the future 🙂

    By far the best way to be responsive is to implement a CSS only scheme. Anything involving regenerating content is going to be inferior. In some cases there may be no choice, but if the content is set up well, a CSS solution should be possible.

    Ideally your CSS will just work regardless of screen width or orientation. In most cases that’s just not possible. Fortunately, you can use media queries to alter the CSS for certain screen sizes (and different output devices such as printers).

    I’d recommend trying to stay with either all max-width or all min-width expressions, otherwise it gets difficult to know what rule is applied where. Your browser’s CSS inspector is a huge help if you do have to mix things up. I’d also try to avoid using orientation if you can help it. The simpler the better 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘responsive input tables’ is closed to new replies.