[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 08-08-2007, 06:03 AM   #1 (permalink)
NamePros Regular
 
Join Date: Aug 2004
Location: by the beach
Posts: 983
596.10 NP$ (Donate)

onewordonly is just really niceonewordonly is just really niceonewordonly is just really niceonewordonly is just really nice


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:
Mydomain coupons - Dotster Coupons - GoDaddy.com Coupons - Hosting Coupons ... more
onewordonly is offline  
Old 08-08-2007, 12:44 PM   #2 (permalink)
Senior Member
 
Xyzer's Avatar
 
Join Date: Aug 2005
Location: United Kindom
Posts: 1,506
90.70 NP$ (Donate)

Xyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to all

Tsunami Relief AIDS/HIV
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..
Xyzer is offline  
Old 08-08-2007, 10:39 PM   #3 (permalink)
NamePros Regular
 
Join Date: Aug 2004
Location: by the beach
Posts: 983
596.10 NP$ (Donate)

onewordonly is just really niceonewordonly is just really niceonewordonly is just really niceonewordonly is just really nice


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:
Mydomain coupons - Dotster Coupons - GoDaddy.com Coupons - Hosting Coupons ... more
onewordonly is offline  
Old 08-09-2007, 03:55 AM   #4 (permalink)
NamePros Regular
 
Join Date: Oct 2003
Location: Sweden
Posts: 395
655.10 NP$ (Donate)

cerebus has a spectacular aura aboutcerebus has a spectacular aura about

Animal Rescue Wildlife Animal Cruelty
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'">
Checking them serverside is probably a better idea though.
cerebus is offline  
Old 08-09-2007, 08:20 AM   #5 (permalink)
NamePros Regular
 
Join Date: Aug 2004
Location: by the beach
Posts: 983
596.10 NP$ (Donate)

onewordonly is just really niceonewordonly is just really niceonewordonly is just really niceonewordonly is just really nice


Quote:
Originally Posted by cerebus
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'">
Checking them serverside is probably a better idea though.
hey that is perfect & exactly what I'm looking for, thanks a lot & I have given you rep points. It also works with this in FF 1.07 & IE 6.1
__________________
Domain Name Coupon Codes for popular registers including:
Mydomain coupons - Dotster Coupons - GoDaddy.com Coupons - Hosting Coupons ... more
onewordonly is offline  
Old 08-10-2007, 01:52 AM   #6 (permalink)
NamePros Member
 
Join Date: Sep 2005
Posts: 147
420.00 NP$ (Donate)

guillermobt is on a distinguished road


Simple and effective. Nice code cerebus
__________________
technfo.com - pick.pk - ajaxpro.es - gbt.es - jamones.cn - sqzd.com - geoinfo.net

Free URL Redirection (for sale) (62,000+ subdomains and growing!!) Real IP / Proxy IP
guillermobt is offline  
Old 08-11-2007, 08:44 AM   #7 (permalink)
NamePros Regular
 
DylanButler's Avatar
 
Join Date: Jan 2006
Location: San Diego, CA
Posts: 704
0.00 NP$ (Donate)

DylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to behold


onerror! thats one you dont see every day.
__________________
:great: -Dylan Butler

EXAMP - San Diego Web Design
DylanButler is offline  
Old 08-11-2007, 09:43 AM   #8 (permalink)
NamePros Regular
 
Marck's Avatar
 
Join Date: Jun 2007
Posts: 735
40.00 NP$ (Donate)

Marck is a glorious beacon of lightMarck is a glorious beacon of lightMarck is a glorious beacon of lightMarck is a glorious beacon of lightMarck is a glorious beacon of light


Is there some reason alt tags wont work here??
__________________
8^X
Marck is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 11:53 PM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85