estoy parando loco por que tengo este script
Código HTML:
$(document).ready(function(){
//###### Código agregado para detectar si hay hash
//obtener hash
var jash = window.location.hash;
// comprobamos si existe un hash valido
if(jash.length > 1){
// si existe buscamos el enlace que contiene ese hash en el href y cojemos su atributo "title"
var href = $("a[href="+jash+"]").attr("title");
////
$.ajax({
url: 'galeria/cargacontenido.php?val='+href,
type: 'GET',
dataType: 'html',
beforeSend: function() {
$('#show').html('<img src="lib/jquery.ajax/images/loading.gif" />');
},
success: function(data, textStatus, xhr) {
$('#show').html(data);
},
error: function(xhr, textStatus, errorThrown) {
$('#show').html(textStatus);
}
});
////
}
//######
//código del menu, nada nuevo aquí
$("#nav a").click(function(){
var href = $(this).attr("title");
$("#show").load("galeria/cargacontenido.php?val="+href+"&ran="+ Math.random());
});
});
</script>
</head>
<body>
<!-- menu -->
<ul id="nav">
<li><a href="#default" title="test.html">Inicio</a></li>
<li><a href="#enlace2" title="fotos/invierno/01.jpg">Enlace 2</a></li>
<li><a href="#enlace3" title="fotos/hotel_petit/010.jpg">Enlace 3</a></li>
<li><a href="#enlace4" title="fotos/verano/10.jpg">Enlace 4</a></li>
<li><a href="#enlace5" title="fotos/wellness/06.jpg" >Enlace 5</a></li>
</ul>
<!-- contenedor donde cargaremos el html externo -->
<div id="show"></div> Código PHP:
<?php
function noCache() {
header("Expires: Tue, 01 Jul 2001 06:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
}
nocache();
// carga contenido externo
$val = $_GET['val'];
$ran = $_GET['ran'];
//echo $val;
//miro si te un .php aleshores el redireccionare
$cadena = $val;
$buscar = ".php";
$resultado = strpos($cadena, $buscar);
if (strpos($val,".php") or strpos($val,".html") or strpos($val,".htm")){
header ("Location:".$val);
}
if (strpos($val,".png") or strpos($val,".jpg")){
echo '<img src="_timthumb.php?src='.$val.'&w=400&h=&zc=1&a=t" alt="'.$val.'" />';
//echo "<img src='../_timthum.php?src=".$val."&w=250&h=&' />";
}
echo $ran;
?> bueno solo funciona si le paso el valor href test.html que lo que hace el cargacontenido.com es mandarme al archivo html y me lo muestra en el div #show
pero lo de mostrar la imagen no me funciona
con el .load() no hace nada ni se inmuta y en la consola de depuracion de internet explorer no me da ningún error
y en el .ajax() me muestra la imagen de loading del parametro del beforeSend pero no me hace el paso del succes
ya no se que más hacer la verdad..

si alguien sabe... le voy a estar agradecido


