Question : Images in select drop-down list

Why are my icon images not appearing in my drop down list?

My HTML code is:

<select class="inputSelect" name="colour">
      <option selected value="-1">Colour</option>
      <option value="0">-------------------------</option>
      <option value="1">Black</option>
      <option value="2">Red</option>
      <option value="7">Green</option>
</select>

and my CSS is:

.inputSelect option:before {
      content: url(/images/test.gif);
}

Answer : Images in select drop-down list

Yes, On your code when you eval CustomerId or bind this Will return a value that will be the name of the image, with the Javascript that I send you you can say that if the return is null or blank or the condition that you wnat then return the default image name if not return the value that get the customer photo.I modify the code because I made a mistake. Will be like this

<script language="vbscript" runat="server">
    Function EvalPhoto(ByVal Customer)
        Dim Cid, ReturnImg
        Cid = Customer
     'If The Customer Exist or the condition that you want
      If Cid is dbnull.value Then
            ReturnImg = Cid
        Else
            ReturnImg = "Default Image"
        End If
        Return ReturnImg
    End Function
</script>
Random Solutions  
 
programming4us programming4us