Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Display a default image when no inage exists

Posted 19 Sep 2006 23:58:53
1
has voted
19 Sep 2006 23:58:53 bry keen posted:
Hello,

here is the code I am trying to get to work.
<!--image source start -->

<%
If Recordset1.Fields.Item("ID".Value <> "" then
response.write ("<img src='www.premier.com/golfIncludes/gcPhotos.asp?id=(Recordset1.Fields.Item('ID').Value"
Else
response.write ("<img src='www.premier.com/images/GCPhotos/genericGolf.jpg")
End if
%>

Image placeholders display but no images.
Help

Replies

Replied 27 Sep 2006 14:36:23
27 Sep 2006 14:36:23 Vince Baker replied:
You have some end tags from you image line missing:

Try this instead

<%
If Recordset1.Fields.Item("ID".Value <> "" then
%>
<img src="'www.premier.com/golfIncludes/gcPhotos.asp?id=(Recordset1.Fields.Item('ID').Value""/>
<%
Else
%>
<img src="'www.premier.com/images/genericGolf.jpg
<%
End if
%>

Regards

Vince Baker
<strong>DMX Zone Manager</strong>

[VBScript | ASP | HTML | CSS | SQL | Oracle | AS400 | ERP Logic | Hosting]

Reply to this topic