Long selection fields displayed as two lines
Posted: Sun Aug 03, 2008 7:43 am
I'm using PHP to render HTML and have a selection box with long text fields which are a combination of two fields (college name and location). An example of part of the selection box would be:
Adelphi University - Garden City, NJ
Adirondack Community College - Queensbury, NJ
I'm trying to do two things, much like Facebook does them -
(1) I would like the first line to say the college and the second (sub-line) the location, as in
Adelphi University
- Garden City, NJ
Adirondack Community College
- Queensbury, NJ
(2) I'd like to allow users to select on more that just the first letter in the selection box, so if the user typed 'ad', the user would see colleges with 'ad' in the name and/or location (such as the two example colleges); if the user typed 'Queensbury', the user would see all of those colleges that had 'Queensbury' in the name and/or location.
I'm assuming this requires JavaScript, but maybe it is something else or a combination of things. Can someone provide any guidance or point to examples on either or both of these?
Thanks!
Michael
Adelphi University - Garden City, NJ
Adirondack Community College - Queensbury, NJ
I'm trying to do two things, much like Facebook does them -
(1) I would like the first line to say the college and the second (sub-line) the location, as in
Adelphi University
- Garden City, NJ
Adirondack Community College
- Queensbury, NJ
(2) I'd like to allow users to select on more that just the first letter in the selection box, so if the user typed 'ad', the user would see colleges with 'ad' in the name and/or location (such as the two example colleges); if the user typed 'Queensbury', the user would see all of those colleges that had 'Queensbury' in the name and/or location.
I'm assuming this requires JavaScript, but maybe it is something else or a combination of things. Can someone provide any guidance or point to examples on either or both of these?
Thanks!
Michael