Professional Web Applications Themes

True / False If statement - Dreamweaver AppDev

Hi I found this code in another forum topic and have not been able to get it to work with my page. I am trying to show an image on a records page instead of 'True' <% If (Recordset1.Fields.Item("ID").Value) = "Yes" Then %> <img src="myfile.gif" width="10" height="10" alt="my image"> <% End If %> Where my info would be <% If (rsDownloads.Fields.Item("msfive").Value) = "True" Then %> <img src="checkbox.gif" alt="yes"> <% End If %> Firstly, is the above code accurate and if so where on the page do I put it for it to run correctly as I am currently getting errors ...

  1. #1

    Default True / False If statement

    Hi

    I found this code in another forum topic and have not been able to get it to
    work with my page. I am trying to show an image on a records page instead of
    'True'

    <% If (Recordset1.Fields.Item("ID").Value) = "Yes" Then %>
    <img src="myfile.gif" width="10" height="10" alt="my image">
    <% End If %>

    Where my info would be
    <% If (rsDownloads.Fields.Item("msfive").Value) = "True" Then %>
    <img src="checkbox.gif" alt="yes">
    <% End If %>

    Firstly, is the above code accurate and if so where on the page do I put it
    for it to run correctly as I am currently getting errors when I insert it into
    my code.

    Any help greatly appreciated as I'm not really much of a coder.

    Cheers
    Julie


    ukjooles Guest

  2. #2

    Default True / False If statement

    Hi

    I found this code in another forum topic and have not been able to get it to
    work with my page. I am trying to show an image on a records page instead of
    'True'

    <% If (Recordset1.Fields.Item("ID").Value) = "Yes" Then %>
    <img src="myfile.gif" width="10" height="10" alt="my image">
    <% End If %>

    Where my info would be
    <% If (rsDownloads.Fields.Item("msfive").Value) = "True" Then %>
    <img src="checkbox.gif" alt="yes">
    <% End If %>

    Firstly, is the above code accurate and if so where on the page do I put it
    for it to run correctly as I am currently getting errors when I insert it into
    my code.

    Any help greatly appreciated as I'm not really much of a coder.

    Cheers
    Julie


    ukjooles Guest

  3. #3

    Default Re: True / False If statement

    Simply
    <% If (rsDownloads.Fields.Item("msfive").Value) Then %>
    <img src="checkbox.gif" alt="yes">
    <% End If %>

    should work.


    "ukjooles" <com> wrote in message
    news:d9rnmv$rhf$macromedia.com... 


    Lionstone Guest

  4. #4

    Default Re: True / False If statement

    Julie,

    Place the code after your recordset code.

    --
    __________________________________________________ __________________
    UltraSuite Extension Packages: http://www.ultrasuite.com/
    The *most popular* Suites of DMX 2004 and DMX Server Behaviors
    for ASP, ASP.Net, ColdFusion, JSP, and PHP_MySQL
    __________________________________________________ __________________


    J.S. Guest

Similar Threads

  1. True or False and why?
    By jjs in forum Macromedia Contribute General Discussion
    Replies: 0
    Last Post: September 18th, 02:11 PM
  2. cfselect and true/false instead of 1/0
    By aamirghanchi@gmail.com in forum Coldfusion Database Access
    Replies: 0
    Last Post: February 6th, 09:24 PM
  3. format true/false
    By Saladin in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: June 16th, 10:43 PM
  4. not (true) not (false)
    By SilentBob'secretfusion in forum Coldfusion - Advanced Techniques
    Replies: 4
    Last Post: May 17th, 10:54 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139