Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

How To Write This

Posted 02 Feb 2002 23:12:55
1
has voted
02 Feb 2002 23:12:55 Edgar Lagmay posted:
Hi,
Could anyone help me write a conditional statement for a table cell that,
when said in English would mean:

If a particular data field has something in it (w/c will ALWAYS have
something), then display this image from this directory. If there's no image
in that directory (not the data field), either display nothing or display
this other image from this (another) directory.

It's different from the usual condition if no image filename or path is
found in a database field like the one below which says:

If this particular field has nothing in it, then display this image.
Otherwise, display nothing.

<td>
<%If(rsRecordsetName.Fields.Item("DataField".Value)<> "" Then %><img
src="/images/<% = rsRecordsetName.Fields.Item("DataField".Value %>"><% Else
%> <% End If %>
</td>

Also, I don't know the opposite of "" which signifies an empty field.

Pardon my ignorance. I'm inexperienced in VBScript yet.
Thank you.

Reply to this topic