Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo box of images?

Status
Not open for further replies.

kenhutchings

Programmer
Jan 11, 2005
32
0
0
GB
Hi all


I want to show my users images in a combo box has anyopne got any idea how it can be done in asp? Or if it just cant be done?

Cheers

ken
 
A "combo box" is a form element, and can display text. I'm not aware of any form element besides the <input type="image"> that will display anything besides text.

If you'd explain in more detail what you want the page to end up looking like, we can come up with ideas to accomplish that.

Lee
 
Could you maybe put each image name or description as an <option> inside a normal <select> and then have a single image that changes as different options are selected?

This is really more of a client-side question than a server scripting question. My advice is to figure out how you want the HTML and cleint script to be in the browser and only then consider how to do the server script to make that possible.
 
Also, if you have all windows users with internet explorer only... that is to say if this is for an internal corporate intranet application... you might find exactly what you want in the form of a downloadable ocx type control.
 
The application is open to all browers as it will be a fully public website. What I was wanting to do was have a combo box where the user can see an image of what they are selecting - which in this case is a font.

Soooo....

if they drop down the combo and got a list of fonts they would see the style of the font itself as an image - i hope this clarify's the matter

Ken
 

Sheco & Lee are both right - decide what you want it to look like at the client, then consider how to generate the client-code on the server.

I also like Sheco's suggestion of switching the image on each selection.

Another way, which will take more effort, but may look 'prettier' (if that's what you're going for) is to create a scrollable DIV element that you make visible to the user when they click on an icon that looks like a combo box button. Then you have full control on the format of the layout. You could put mouseover events to highlight the rows etc etc, and update form controls with the selected values when the user clicks.

In other words, develop your own custom combo box. Similar to a DHTML/Javascript Drop down menu.

Hope that sparks some ideas.


A smile is worth a thousand kind words. So smile, it's easy! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top