1

In my GUI, I need a 3x3 array of radio-buttons, constrained so that only one can be selected in each row, and only one can be selected in each column.

Is this possible client-side, without Javascript (I'm happy to use javascript, but would like a fallback for when JavaScript is off)? Or is my only option Javascript and server-side enforcement?

finnw
  • 47,861
  • 24
  • 143
  • 221
Chowlett
  • 45,935
  • 20
  • 116
  • 150
  • The problem is, without JavaScript, there is no way to ensure the postback without a submit input anyway. Where the logic occurs doesn't matter, but *getting* it there, does. Consider the difference between hitting "okay" and a post-back for form validation errors to be displayed and validation errors displayed as you enter invalid data (or until you enter data) via JavaScript. The latter is generally more fluid. (But ultimately the server is responsible for *accepting* the input, even with client-side validation and pretties.) –  Dec 06 '10 at 09:50

1 Answers1

0

Realistically, your only option is JavaScript. Enforcing a by-row or by-column constraint on your inputs is obviously quite possible, but it wouldn't be possible to do this in the "sudoku-like" way you're thinking since each set of controls in a group must share the same name.

Phil.Wheeler
  • 16,748
  • 10
  • 99
  • 155