Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004

    Unanswered: Image Source problem

    The 3 lines of code below, do not produce an error, but, the variable image does not show.

    1. Yes my browser is set to show pictures
    2. I check the properties of the image box with the little red "X" in the corner, and it showed the complete path, but NOT the image file itself, which is represented below by the fields.item variable.
    3. Yes, the fields.item statement has the correct value in it I checked, and because the link works.

    What have I done wrong?

    <td align="left"> <a href="<%response.write"images/"&(rs.Fields.Item("picturefile"))%>">

    <img src="images/"<%rs.Fields.Item("picturefile")%> alt="" name="Thumb" width="80" height="80" border="1">


    Thanks for any help.

  2. #2
    Join Date
    Jul 2003
    Is "picturefile" a string representing the file name, or a BLOB which contains the actual image itself?

    If it's just the file name of the picture, try this:

    <img src="images/<%=rs.Fields.Item("picturefile")%>" alt="" name="Thumb" width="80" height="80" border="1">

    The only change I made, was to add "=" after the <%, and move the "double quote" from before <% to after %>

    The purpose of the "=" is that it acts as a Response.Write and will write the value of "picturefile" to the HTML. Secondly, the double quote before the <% needed to be moved to after the %> since you want the file name to be included in the SRC attribute. Previously, only the value "images/" was being picked up...

    Hope that helps!
    That which does not kill me postpones the inevitable.

  3. #3
    Join Date
    Feb 2004
    It helped!

    All done.

    Thanks a ton!

    After about 90 mins of playing with it (and becoming frustrated beyond belief), it ensures that I won't soon forget it for next time...

    Thanks again.

  4. #4
    Join Date
    Dec 2003
    <%= Request("fieldName") %>


    <% Response.Write Request("fieldName") %>

Posting Permissions

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