Forum Moderators: coopster

Message Too Old, No Replies

DD box to show icons instead of textual list

does not look possible, any clue?

         

henry0

11:30 am on Mar 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am investigating the following idea
instead of the usual textual choices offered in a drop down box I would like showing as many icons as rows exist.
as is it shows "blank"
if I change "<" and ">" by their entity
in that line:
$thumb_name="<img src=\"../galleries/all_gal/$gal/thumbs/$thumb_name\">";

then it shows
the correct code but it does not trigger the img display
I doubt it's even possible
but if it was I could extract from the result passed by the form the needed data, actually the thum's name.

$num=$db->num_rows($result);
$i=0;
echo '<select name="thumb_name">';
$i=0;
while ($i <$num)
{
echo '<option>';
$thumb_name=mysql_result($result,$i,"thumb_name");
$thumb_name="<img src=\"../galleries/all_gal/$gal/thumbs/$thumb_name\">";
echo"$thumb_name";
$i++;
}
echo"</option></select>";

coopster

3:30 pm on Mar 12, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



With some client-side code (JavaScript) and a block container such as a <div> you can "emulate" a <select> list with images in it.

henry0

4:17 pm on Mar 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I will look around
if I find some decent solution I will post it
thanks