my dog learned polymorphism*
The moose likes HTML, CSS and JavaScript and the fly likes Multi column list box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Multi column list box" Watch "Multi column list box" New topic
Author

Multi column list box

K Robert
Ranch Hand

Joined: May 16, 2003
Posts: 116
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

Joined: Jan 10, 2002
Posts: 60806
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
K Robert
Ranch Hand

Joined: May 16, 2003
Posts: 116
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

Joined: Jan 10, 2002
Posts: 60806
    
  65

The checkbox value is assigned the primary key of the data for the row.
Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256
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.


Life called,so here I am.<br />Cheers<br />Niki.:-)
 
Consider Paul's rocket mass heater.
 
subject: Multi column list box
 
Similar Threads
Multi-column sort
Multi Column List
Swings
Throwing an Exception when deleting a row
multi-selection list box