3

Being a complete front-end beginner, I'd like to know how I can select and highlight multiple cells of an HTML table using mouse. The main goal is to mark three areas of an HTML table (say Red, Green and Blue) representing different sections.

If those sections are initially wrongly highlighted, the user can redefine them by clicking on, say, a radio button "Red", and then select the cells on the table that should have been highlighted in red.

What should be my approach / how could I rather simplify it if possible? Does something of this sort exist already? The below idea, just for an HTML table:

enter image description here

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Syed
  • 340
  • 1
  • 3
  • 13
  • What do mean by "selecting" a cell? what do you want to achieve by that? – rahul Dec 05 '16 at 11:25
  • @RahulRavindran The user would use their mouse to select an area on the table which would highlight the cells falling within that area. The coordinates of the new area will be communicated later using a submit / POST request so that the controller can work further with this info. – Syed Dec 05 '16 at 11:30
  • 2
    maybe this can help: http://stackoverflow.com/questions/2013902/select-cells-on-a-table-by-dragging – Nomistake Dec 05 '16 at 15:24
  • @Nomistake that's seems to be quite helpful. I'll start right away with it, thanks – Syed Dec 05 '16 at 16:07

0 Answers0