Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multi column list box

 
K Robert
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to create a multi column list box. Each record contains 4-5 fields of static data. Example:

Site #
Site Name
Location
Phone Number
etc...

How should I go about this?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no native HTML element that will allow you to do this. You could create a table where the first column contains a checkbox to select each row.
 
K Robert
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay, but then, how do I associate the values in the columns to the checkbox and use that as a variable to pass to another page?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The checkbox value is assigned the primary key of the data for the row.
 
Niki Nono
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The checkbox when selected will give you the index of the row..
Since you have a table of html elements you have an array of elements.
you simply access this array using the index got by the checkbox selected.
Hope this is clear.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic