oops. Thanks Ken. Thought it may have meant the link was being taken from
the DB, and not the image.
Cheers,
Andrew
-----Original Message-----
From: Ken Schaefer [mailto:ken@a...]
Sent: Monday, 12 November 2001 1:59 PM
To: HTML Code Clinic
Subject: [html_code_clinic] RE: If Src image is unavailable ?
Well, Sree was storing the image in a database...so the FSO probably wont
help him
Sree,
What you can do instead is something like this:
<img src="/images/page1.asp">
and in page1.asp you have code to check your database for the image. If the
recordset is not .EOF then you have the image, and you set the
Response.ContentType and then BinaryWrite the image data to the client.
Otherwise, you can either Response.Redirect, or Response.BinaryWrite your
alternate image.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Andrew Haslett" <scooter@p...>
To: "HTML Code Clinic" <html_code_clinic@p...>
Sent: Friday, November 09, 2001 8:10 PM
Subject: [html_code_clinic] RE: If Src image is unavailable ?
: I think you can first use the FileSystemObject to first check if the file
is
: available. I think the method is 'object.fileexists(URL)' from memory.
So
: a simple IF statement should work:
:
: If file exists
: show this image
: Else
: show another
: End if
:
: Docs on FSO can be found here: (watch wrap)
:
http://msdn.microsoft.com/library/default.asp?URL=/library/devprods/vs6/vbas
: ic/vbenlr98/vaobjFileSystemObject.htm
:
: HTH,
:
: Andrew
:
: -----Original Message-----
: From: Sreekumar [mailto:sreekumarp@y...]
: Sent: Friday, 9 November 2001 7:19 AM
: To: HTML Code Clinic
: Subject: [html_code_clinic] If Src image is unavailable ?
:
:
: Hello,
:
: I have to show an Image in my ASP page I am not sure whether the src
: image is there in the specified directory or not as it's taken from the
: database. So if there is no image, how can i know that
: and show an alternate image. Can we give more than one source element?
:
: <img border="0" src="./an01124.gif" >
:
: Thanks in Advance
: Sree
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$subst('Email.Unsub')