Image problem

Results 1 to 3 of 3

Thread: Image problem

  1. #1
    Kate Guest

    Default Image problem

    I have written some script so that if a field in a table is null then it gets replaced by an Image:<BR>&#060;% <BR>If IsNull(rs("Publicity")) Then <BR> response.write("&#060;img src=""../Images/Guide/Recherche/perrocolor.gif""&#062;") <BR><BR>else %&#062;<BR><BR>My problem is that one of the fields is inserted in an image src<BR>code like this<BR><BR>&#060;img src="../Images/Guide/Recherche/Pictos/&#060;%=rs.fields("PubImage").value%&#062;"&#062;< BR><BR>and even though the field might be null the browser still brings up a space for an image as well as the image that is supposed to replace it.<BR><BR>How can I sort this out.

  2. #2
    Join Date
    Dec 1969

    Default RE: Image problem

    i always hate using the null comparison b/c of its unreliable results. i use the len() function. ie...<BR>if (len(rs("foo") = 0) then &#039;do whatever<BR>end if<BR><BR>2 cents<BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: Image problem

    try to use "&#060;%=trim(rs.fields("PubImage").value)%&#0 62;"

Posting Permissions

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