I don't know much javascript. I used to know some dom, but I've forgotten most of it.
The goal is to have a table, with information cells. When a user clicks on a cell, it will trigger js that will pull attributes from that cell and populate it into another element on the same page.
example:
(table)
(tr) (td row='row15' col='col5') Sunny (/td)
(td row='row15' col='col6') Cloudy (/td)(/tr)
(/table)
(form)
(input id='row' type=hidden name='row' value=)
(input id='col' type=hidden name='col' value=)
(/form)
Based on my example, I'd like to be able to click on a cell and have js extract the row and col attributes from the (td) cell and write to the the hidden inputs for the form, which is on the same page.
I know it's possible and I am currently search for it, however it's be great if someone told me the answer before I got to it myself.
The goal is to have a table, with information cells. When a user clicks on a cell, it will trigger js that will pull attributes from that cell and populate it into another element on the same page.
example:
(table)
(tr) (td row='row15' col='col5') Sunny (/td)
(td row='row15' col='col6') Cloudy (/td)(/tr)
(/table)
(form)
(input id='row' type=hidden name='row' value=)
(input id='col' type=hidden name='col' value=)
(/form)
Based on my example, I'd like to be able to click on a cell and have js extract the row and col attributes from the (td) cell and write to the the hidden inputs for the form, which is on the same page.
I know it's possible and I am currently search for it, however it's be great if someone told me the answer before I got to it myself.