...

View Full Version : What is wrong with this code?



dowens
12-06-2007, 04:54 PM
DW8

I want to display a image if Status = 'Processed' else display no image.



<% If (Recordset1.Fields.Item("Status").Value) = "Processed" then%>
<td bgcolor="#FFFFFF" scope="col"><img src="images/pdf.png" alt="PDF Image" width="36" height="22" border="0"></td>
<% Else %>
<td bgcolor="#FFFFFF" scope="col">&nbsp;</td>
<% End If %>

Spudhead
12-06-2007, 05:42 PM
There's nothing particularly wrong with it, but if it's not doing what you expect then you could put

<&#37;response.write(Recordset1.Fields.Item("Status").Value)%>

in front of it to see what value you're actually getting.

dowens
12-06-2007, 07:36 PM
Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/pei/inquiry.asp, line 209:o

DakotaChick
12-07-2007, 01:17 AM
Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/pei/inquiry.asp, line 209:o

Whats on line 209???



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum