mostlylucid

scott galloway's personal blog...
posts - 916, comments - 758, trackbacks - 11

My Links

News

Archives

Post Categories

Misc. Coding

Little Javascript tip...OnError for Images...

This is an odd little tip...not sure where I found this out, but I use it a fair bit...if you have an image which you're not sure will be available, add this to the img tag: OnError="this.src='/images/shim.gif';this.width='1';this.height='1'" (where images/shim.gif is an image which will ALWAYS be available - if not you'll get an odd error...).

Anyway, prevents the ugly broken image thing...

Print | posted on Saturday, October 11, 2003 1:03 AM | Filed Under [ Random ]

Comments have been closed on this topic.

Powered by: