Results 1 to 6 of 6
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Image not recognized... (2000)

    Hi all, My problem:
    This script make a paging.
    If i click on link in the column MTR appear a popup with many data and an images( for example i have insert only one 20009.jpg)
    Well, insert in the box MATRCICOLA the value 20009 and press enter.
    After, click in the column MATR on the refered value.
    Apper a popup with many data and image.
    But if int the dir IMMAGINE not is present the related image of value present in the column MATR is possible to show in the popup the image named 99999.jpg
    (for me is similar to the instruction in VBA "OnError")

    Tks Sal.
    i hope of to have been clear

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Image not recognized... (2000)

    If I understand your question, it sounds like you want to show image 999999.jpg when there is not other image in the table?

    If so, you can use an IIF (Immediate IF) function within the call that reads the image name. It might look like this:

    <%=IIF(ObjRS("MATRICOLA") = "","999999.jpg",ObjRS("MATRICOLA") )%>

    For more details on the IIF function, see VBA or VBScript help. Also, you may have to adjust the test value. I assume it will return empty string (""), but it's possible that it could return null when no record is present. If that's the case, you'll want to test for null rather than empty string:
    <%=IIF(ISNull(ObjRS("MATRICOLA"))=true,"999999.jpg ",ObjRS("MATRICOLA"))%>

    Hope this helps.

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Image not recognized... (2000)

    Tks, Mark, many tks.
    But this is my first important project in ASP.
    Where i insert or modifiy mi script assuming the piece of script (for me) is this:
    </tr>
    <tr class="myStyle_INTESTAZIONE">
    <td width="201" height="20" align="center" rowspan="3"><font face="Verdana" size="1"></font>[img]IMMAGINI/<%=ObjRS([/img].jpg" border="0">
    </td><td width="327" height="7" bgcolor="#66CCFF" colspan="2"><font face="Verdana" size="1"><%=ObjRS("ID")%></font></td>

  4. #4
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Image not recognized... (2000)

    Replace the script in the <img> tag with the suggestion I offered in the previous post.

    like this:

    <img src="IMMAGINI/<%=IIF(.......

  5. #5
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Image not recognized... (2000)

    I did not include that part, but you will need to add it after the closing script tag (%>), just like you have it now.

  6. #6
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Image not recognized... (2000)

    I am sorry Mark...
    but the original rs have <%=ObjRS("MATRICOLA")%>.jpg
    I dont see in you condition the suffix .jpg to identify the image

    But my idea in other word:
    If in the dir IMMAGINI not is present the realted images with the name "numberofmatricola.jpg" show in this case always the image 99999.jpg ...
    In this image i have insert a word:NOT FOUND

    If you have a time for my test with you correction.

Posting Permissions

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