Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Multiple tables, with Multiple check boxes in each table, on the same page

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have got 3 tables on the same page.And in each table I have got radio buttons. Now when I check a radio button, I want to retrieve the radio button row number (in that table).

FYI: The code for drawing these 3 tables is the same. Every time I want to draw a new table, i am passing a different tableId to the javascript method.

Can you call help me with this..
 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it something like that you have got 3 tables with individual radio buttons on each and as and when you click on the radio button inside a particular table, you should be retrieving the number/index value of the radio button in a different column on the same table?
 
Amar kon
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

That is exactly what I want to do. I have a delete button (which deletes the selected row) at the bottom of the page. So when i check the radio button, i should be storing the row number/row id, and when i click delete button, i should be able to retrieve the row number/row id and then be able to delete that row.

I didnt get what you mean by 'number/index value of the radio button in a different column on the same table? ', but the remaining part of your reply is what i want to do..
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you post back the form, shouldn't the values in the form submission tell you what item was selected?

If you are doing it with JavaScript, you can look at the elements parentNode and that parentNode and that parentNode and so on until you get your row and your table ids. Better yet is to build up a naming scheme for your elements that tell you that info.

Eric
 
please buy this thing and then I get a fat cut of the action:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic