[Javascript] Alternative Image

Shawn Milo shawn.milo at gmail.com
Tue May 17 13:53:39 CDT 2005


You can easily automate the entry of the image names into your
database. I doubt that using a server-side script to hit a database
will cost you more than a half-second in page load time. If you'd like
some help with these non-Javascript issues, you can e-mail me
off-list.

Shawn

On 5/17/05, Innerlab <innerlab at hotmail.com> wrote:
> ----- Original Message -----
> From: "Cutter (JS)" <java.script at seacrets.com>
> 
> > Generally JS is a client side language, whereas you would want a
> > server side language for directory access...
> 
> The original images displayed are dynamic (with ASP). But If I rely on SQL
> queries to a database, or some file system commands to check my website
> folders to see if such image is there, the whole things takes too many
> resources (plus the time of typing the images' names into a DB). So I hoped
> the client could do that with javascript.
> 
> I found the following solution, but it may not work with all browsers:
> 
> <img src="Orig_Img.jpg" onerror="this.src='Alt_Img.jpg';" />
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
> 


-- 
Voicemail any time at:
206-666-MILO



More information about the Javascript mailing list