B2B Articles - May 15, 2011 - By Ironpaper
As part of our web design tips and tactics guide, here is a sometimes useful javascript technique of hiding broken images and their ALT text. This can be useful ( as a quick, temporary fix) when pulling from another source such as a dynamic array or a database output which may have a few broken paths. This can also be used as a bulletproofing technique for interface design as a temporary solution when dealing with tricky image sources.
<img src="#" alt="I WANT TO HIDE THIS WHEN THE IMAGE IS BROKEN" onerror="this.style.display='none'">
Here is the snippet:
onerror="this.style.display='none'"
The onerror event is supported in all major browsers.
Ironpaper, Webintel:
SUBJECT: web design guide
Tel 212-993-7809
Ironpaper ®
10 East 33rd Street
6th Floor
New York, NY 10016
Map
New York Agency
B2B marketing
B2B Content
Demand generation agency
Digital Marketing
Account-Based Marketing
ABM for SaaS
ABM for energy
Demand generation campaigns
Industry marketing
Privacy Policy
First-party data marketing
SaaS marketing
SEO for B2B
IoT Marketing
B2B Marketing for IoT Companies
HubSpot Agency
B2B Product Marketing
B2B Software Marketing
IoT go-to-market strategy
IT Marketing
HubSpot for ABM
ABM for AI companies
Technology Marketing
Marketing for IT Companies
ABM Campaigns
B2B lead generation
B2B Marketing and Growth Agency.
Grow your B2B business boldly. Ironpaper is a B2B marketing agency. We build growth engines for marketing and sales success. We drive demand generation campaigns, ABM programs, B2B content, sales enablement, qualified leads, and B2B marketing efforts.