HighDots Forums  

Re: Alternate for red cross

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Re: Alternate for red cross in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dreamworms webforumsuser@macromedia.com
 
Posts: n/a

Default Re: Alternate for red cross - 08-02-2003 , 09:15 AM






using show/hide if recordset is empty you can generate this effect.
I think you should use "no picture provided" for that matter.

HTH

DREAMWORMS
http://www.siteatelier.com
dreamworms (AT) sitealier (DOT) com

:: What I do is what I dream about, because I know when I do that I'll never go wrong ::

Reply With Quote
  #2  
Old   
HotDeveloper webforumsuser@macromedia.com
 
Posts: n/a

Default Re: Alternate for red cross - 08-03-2003 , 02:36 AM






Thank for replying but unfortunately things are not that simple.

The exact scenerio is that i'm retriving the path of the file from the database. Problem is that, if for any reason, the path is there but the image is not at that path then i dont get an empty recordset but a cross mark instead. Hope this time i better explain my problem.

So what is the solution now.

Uzair



Reply With Quote
  #3  
Old   
Gary White
 
Posts: n/a

Default Re: Alternate for red cross - 08-03-2003 , 09:25 AM



"David R. Wheeler" <dont-want (AT) no (DOT) spam> wrote

Since you haven't said what server model you are using, this is how to
display an alternate image in ASP/VBScript

<%If rsName.Fields.Item("imgName").Value <> "" Or
IsNull(rsName.Fields.Item("imgName").Value) Then %>
<img src="path/<%=(rsName.Fields.Item("imgName").Value)%>">
<% Else %>
<img src="path/noimage.gif">
<%End If %>


If I understand what was wanted, that won't quite do it. Uzair said that, if
the path/file name IS there, but the image file is not, he wants to display
alternate or no content. I don't have my VBScript reference here, so I
cannot give the code, but I believe you'll need the FileSystemObject to
check to see if the file exists. Presumably, that would be done in the IF
portion of your construct.

Gary



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.