I'm creating a table with X amount of rows (Importing from a Database table). I need to be able to click on a row in the table (any specified row), and onClick, the row number that was clicked on must be printed. Can anyone give me some advice on how to do this please?
Where do you want to be printed?
I would suggest to have a button with each row that has that "onclick" event.
When the rows are dynamically created you can have the value you want to be printed passed as a parameter at a method in the "onclick" event.
I don't if you can just click the row. Check this site to see if the
<tr> tag has an "onclick" event:
Well, I want to get select all rows from a specific database table to a JSP page. Then I want the JSP page to auto-generate an html table with all the data from the resultset. Once the data is displayed, I want to be able to click on any of the rows on the html table and get the value for the row number I clicked on so that I can reference an ArrayList of javabeans which contain each cell's data that will be sent to separate input fields that have Add/Update/Search functions, that require the text in the text input areas. Wow what a mouthful.