Image in a list box |
Image in a list box |
robgratt |
Apr 24 2007, 07:36 AM
Post
#1
|
Group: Members Posts: 6 Joined: 24-April 07 Member No.: 2,614 |
Hi,
I would like to display images in a list box. I have searched the web, but have not found any way of doing this. PHP, Javascript etc. would be fine. Anyone any ideas? |
Frederiek |
Apr 24 2007, 07:47 AM
Post
#2
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
How about CSS?
Go see eg. at Listamatic. |
Christian J |
Apr 24 2007, 11:21 AM
Post
#3
|
. Group: WDG Moderators Posts: 9,653 Joined: 10-August 06 Member No.: 7 |
Or did you mean a SELECT menu? In that case a background image might be used for either the SELECT or OPTION element, but few browsers support it.
|
robgratt |
Apr 25 2007, 07:00 AM
Post
#4
|
Group: Members Posts: 6 Joined: 24-April 07 Member No.: 2,614 |
Thanks, Frederiek. I didn't make myself clear. I wanted to be able select from a drop down list where each item in the list has a different image. I have had a quick look at the Listomatic stuff, but they seem to use the same image for each item in the list. Will keep looking, though. Rob |
robgratt |
Apr 25 2007, 07:01 AM
Post
#5
|
Group: Members Posts: 6 Joined: 24-April 07 Member No.: 2,614 |
|
pandy |
Apr 25 2007, 07:08 AM
Post
#6
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
But what kind of drop down list do you want? Your only complaint about the Listamatic ones seems to be that they displayed the same image for all options. That can easily be changed. But if you want to use a form as Christian suggested it's a whole other matter.
|
Christian J |
Apr 25 2007, 08:00 AM
Post
#7
|
. Group: WDG Moderators Posts: 9,653 Joined: 10-August 06 Member No.: 7 |
When you say 'few' which ones do you mean? Only Firefox on Windows. Havent' tested Safari/Mac. They should all support background-color, though. OTOH, if you're using the SELECT element for site navigation you might consider a DHTML menu like http://alistapart.com/articles/dropdowns these can be styled much more. |
robgratt |
Apr 25 2007, 05:29 PM
Post
#8
|
Group: Members Posts: 6 Joined: 24-April 07 Member No.: 2,614 |
When you say 'few' which ones do you mean? Only Firefox on Windows. Havent' tested Safari/Mac. They should all support background-color, though. OTOH, if you're using the SELECT element for site navigation you might consider a DHTML menu like http://alistapart.com/articles/dropdowns these can be styled much more. Christian J, Thanks for bearing with me on this. Will try the SELECT/OPTION route. I want to allow customers to select from a graphic of a product and put the resultant value into a form. Will check out the URL you sent. Regards, Rob |
Christian J |
Apr 25 2007, 05:54 PM
Post
#9
|
. Group: WDG Moderators Posts: 9,653 Joined: 10-August 06 Member No.: 7 |
|
robgratt |
Apr 25 2007, 07:10 PM
Post
#10
|
Group: Members Posts: 6 Joined: 24-April 07 Member No.: 2,614 |
I want to allow customers to select from a graphic of a product and put the resultant value into a form. Why not use radio buttons next to images? Christian, There are rather too many large images to show on one page. I could open another with all images next to radio buttons as you suggest, but how could I pass the chosen option back to the original form so it can be submitted? So many questions... TIA, Rob |
Christian J |
Apr 26 2007, 09:47 AM
Post
#11
|
. Group: WDG Moderators Posts: 9,653 Joined: 10-August 06 Member No.: 7 |
How about a scrolling DIV (using CSS "overflow: auto") containing images with radio buttons (or checkboxes, if you want to allow multiple choices)?
|
Darin McGrew |
Apr 26 2007, 12:19 PM
Post
#12
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
I could open another with all images next to radio buttons as you suggest, but how could I pass the chosen option back to the original form so it can be submitted? This is moving away from a simple form and becoming more of a "web application", but the basic idea is that you have multiple submit buttons on your main form. One of the submit buttons is for selecting the image. When that submit button is chosen, the server-side program that processes the form data will save your current data and return a second form that allows the user to select an image. When that second form is submitted, then the server-side program sends a third form that looks a lot like the first form, except that the selected image is shown, and any of your current data is pre-filled in the other fields. |
robgratt |
Apr 27 2007, 10:23 PM
Post
#13
|
Group: Members Posts: 6 Joined: 24-April 07 Member No.: 2,614 |
I could open another with all images next to radio buttons as you suggest, but how could I pass the chosen option back to the original form so it can be submitted? This is moving away from a simple form and becoming more of a "web application", but the basic idea is that you have multiple submit buttons on your main form. One of the submit buttons is for selecting the image. When that submit button is chosen, the server-side program that processes the form data will save your current data and return a second form that allows the user to select an image. When that second form is submitted, then the server-side program sends a third form that looks a lot like the first form, except that the selected image is shown, and any of your current data is pre-filled in the other fields.Hi, Once again for all who responded. I realise that I maybe should have posted in the PHP section of the board. What you describe is exactly what I want to do. It was the "a third form that looks a lot like the first form, except that the selected image is shown," part that made the lights come on. Thanks again, Rob |
ravrC |
May 31 2007, 05:52 PM
Post
#14
|
Group: Members Posts: 1 Joined: 31-May 07 Member No.: 2,961 |
Hi, I would like to display images in a list box. I have searched the web, but have not found any way of doing this. PHP, Javascript etc. would be fine. Anyone any ideas? check this, free code: http://scbr.com/docs/products/dhtmlxCombo/index.shtml -C |
Christian J |
Jun 1 2007, 08:14 AM
Post
#15
|
. Group: WDG Moderators Posts: 9,653 Joined: 10-August 06 Member No.: 7 |
That select box with icons doesn't work at all if javascript is disabled, or (in IE) if activeX is disabled. |
Lo-Fi Version | Time is now: 18th April 2024 - 04:20 PM |