| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Senior Member Join Date: Aug 2004 Location: by the beach
Posts: 1,104
![]() ![]() ![]() ![]() ![]() | Hide Dead Images with Javascript Hello, I have a page the gets images from a 3rd party and I want to use a script that will hide images that are not working. This site is not using php so I thought Javascript would be good. I can't seem to find anything?
__________________ Domain Name Coupon Codes for popular registers including: Domain name coupons - GoDaddy.com Coupons - Hosting Coupons ... more |
| |
| | #2 (permalink) |
| Senior Member Join Date: Aug 2005 Location: United Kindom
Posts: 1,502
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Hmm.. I'm not entirely sure if this is possible with Javascript, becuase it is a client side language. You could do with something server side like a cron job that say every hour would check the links and then if they do not exist or something.. delete them from the database, assuming you are using one.. |
| |
| | THREAD STARTER #3 (permalink) |
| Senior Member Join Date: Aug 2004 Location: by the beach
Posts: 1,104
![]() ![]() ![]() ![]() ![]() | ok I see, well it is on a database with ASP this site, just a very small site using an access database which is updated once a week.... But I do have this problem with other sites that use PHP & MySql when I use merchant datafeeds and there is often broken images in the datafeed. Yes I think I know what your getting at, I might have to come up with something that looks up the images in the database.
__________________ Domain Name Coupon Codes for popular registers including: Domain name coupons - GoDaddy.com Coupons - Hosting Coupons ... more |
| |
| | #4 (permalink) |
| NamePros Regular Join Date: Oct 2003 Location: Sweden
Posts: 395
![]() ![]() | I think onerror should work for that, did it a quick run in FF2 and IE6/7 and seems to work there at least: Code: <img src="imglink.jpg" onerror="this.style.display='none'"> |
| |
| | THREAD STARTER #5 (permalink) | ||||
| Senior Member Join Date: Aug 2004 Location: by the beach
Posts: 1,104
![]() ![]() ![]() ![]() ![]() |
__________________ Domain Name Coupon Codes for popular registers including: Domain name coupons - GoDaddy.com Coupons - Hosting Coupons ... more | ||||
| |