Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Aug 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question What is wrong with this code?

    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 %>

  • #2
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    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.

  • #3
    New to the CF scene
    Join Date
    Aug 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    This is the error

    Error Type:
    Microsoft VBScript compilation (0x800A0400)
    Expected statement
    /pei/inquiry.asp, line 209

  • #4
    Regular Coder
    Join Date
    Mar 2006
    Location
    Sumter, SC
    Posts
    178
    Thanks
    10
    Thanked 4 Times in 4 Posts
    Quote Originally Posted by dowens View Post
    Error Type:
    Microsoft VBScript compilation (0x800A0400)
    Expected statement
    /pei/inquiry.asp, line 209
    Whats on line 209???


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •