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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Choosing an image in a form from database

Status
Not open for further replies.

dancinOTG

Technical User
Aug 28, 2002
19
CA
I have a database with an icon table .. the files are listed like this IconId 1
Icon icon1.gif.

People fill out the form and I have a drop down box with a list of the files from the icon table. Right now it is just giving the file name ie icon1.gif. Is there a way to get the image to actually show up in a drop down box? Sort of like choosing an avatar on a game site to show up next to your name.

The image shows on the resulting asp page with a table of all form entries but i can't get it to show on the form itself.

I'm very new to this any help would be appreciated.

*s* thanks
danc

 
You can't actually put images within a dropdown menu. Your best best is to put the images into a table with a radio button next to each one. Then the user can just select the image they want by clicking the radio button. Something like:

While Not rs.EOF

<input type=&quot;radio&quot; name=&quot;image&quot; value=&quot;<% =rs(&quot;iconname&quot;) %>&quot;><img src=&quot;<% =rs(&quot;iconfilename&quot;) %>&quot;>

rs.movenext
Loop

Then just check the value of 'image' when the form is processed to discover which icon was selected. Nick (Web Developer)


nick@retrographics.co.uk
 
[tt] FYI Nick,
There's an image missing in your page
[tt]&quot;A Successful man is one who can build
a firm foundation with the bricks
that others throw at him&quot;
[/tt]

star.gif
star.gif
star.gif
star.gif

 
tnks i'll try that when i get home from work *eg*

dancin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top