Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Alternative Image


  • From: innerlab at hotmail.com (Innerlab)
  • Subject: [Javascript] Alternative Image
  • Date: Tue May 17 13:32:21 2005

----- Original Message ----- 
From: "Cutter (JS)" <java.script@xxxxxxxxxxxx>

> 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';" />