Jump to content

Display images in a drop down list


xx_princess_xx

Recommended Posts

I have the image url stored in my sql database, so far i got this but i think im missing a quote, or apostrope

i want the images to be displayed in a drop down menu

 

  echo '<option value="<img height='80' width='120' src='".$row['photo']."'">'<img height='80' width='120' src='".$row['photo']."''</option>';

 

Link to comment
Share on other sites

I wanted to do this, after a lot of googling I found some examples how it is made.

 

The thing is like OP said this is not doable in a normal drop down. You will have to use CSS and javascript.  So You will put all the options and the images into divs and then make them look like drop down list with css. Then add javascript functions for the onClick method, mouseover etc.

 

GL making that :)

 

P.S. I did't make it :( My contractor gave me too little time to play around ;)

Link to comment
Share on other sites

The thing is like OP said this is not doable in a normal drop down. You will have to use CSS and javascript.  So You will put all the options and the images into divs and then make them look like drop down list with css. Then add javascript functions for the onClick method, mouseover etc.

 

Overkill.

 

All you need

 

radio - image

radio - image

radio - image

update button

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.