Ver Mensaje Individual
  #6 (permalink)  
Antiguo 29/10/2012, 18:11
Avatar de IsaBelM
IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 15 años, 10 meses
Puntos: 1012
Respuesta: Verificar 200 ok por javascript o jquery

con un ejemplo se entenderá mejor
Cita:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title></title>
<head>
<script type="text/javascript">document.write('<img src="http://static.forosdelweb.com/fdwtheme/images/buttons/reply.gif?'+Math.random()+'" style="display:none" onload="fnc(true);" onerror="fnc(false);" />');</script>
</head>
<body>
<script type="text/javascript">
function fnc(exito) {
if (!exito) {
document.getElementById('framebox').src = 'http://www.maestrosdelweb.com/';
}
}
</script>
<IFRAME id="framebox" name="framebox" frameborder="1" scrolling="auto" src="http://www.forosdelweb.com/"></IFRAME>
</body>
</html>
como ves pido una imagen de forosdelweb (reply.gif). como existe, en el iframe se cargara forosdelweb. si ahora cambiamos el nombre de la imagen por (replys.gif), como no existe, en el iframe se cargará maestrosdelweb
__________________
if(ViolenciaDeGénero) {alert('MUJER ASESINADA');}