View Single Post
Old 08-29-07, 01:10 PM   #7
Ngemu Mod
Join Date: Jul 2003
Location: Fresno, CA
Posts: 1,886
Default Re: Detecting Bad Links

Originally Posted by evilghost
You may run into some security restrictions on the DOM model but you could try loading your target site into a hidden IFRAME, detect if there's body in the IFRAME, and if not, then keep them on the page else parent.window.location.href redirect them.
Thanks for the help, but the document loaded in the Iframe is from another webserver/domain. I get an access denied error when I try to count the number of body tags in the document.

Is there a way to detect 404 errors in an iframe?
[i7 2600k @4.4ghertz][2x4 GB DDR3 1600][EVGA GTX570 1.280GB SC][EVGA GTX460 physx][Asrock Extreme7 Gen3 Z68][2xSeagate 160 Gb SATA HD raid0][Seagate 250 GB SATA2 HD][Sony Bravia 40' 1080p LCD HDTV][NEC 3520a DVD+-DLw][Windows 7 Ultimate x64][Rosewill 1000w]
fivefeet8 is offline   Reply With Quote