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';" />
- Follow-Ups:
- [Javascript] Alternative Image
- From: Shawn Milo
- [Javascript] Alternative Image
- References:
- [Javascript] Disable NETSCAPE (CONTROL-CLICK, SHIFT CLICK)
- From: Keshav K Habib
- [Javascript] Alternative Image
- From: Innerlab
- [Javascript] Alternative Image
- From: Cutter (JS)
- [Javascript] Disable NETSCAPE (CONTROL-CLICK, SHIFT CLICK)
- Prev by Date: [Javascript] Alternative Image
- Next by Date: [Javascript] Alternative Image
- Previous by thread: [Javascript] Alternative Image
- Next by thread: [Javascript] Alternative Image
- Index(es):