![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
07/03/2005, 15:47
|
![Avatar de miraslav](http://static.forosdelweb.com/customavatars/avatar78463_1.gif) | | | Fecha de Ingreso: octubre-2004 Ubicación: Barcelona
Mensajes: 102
Antigüedad: 20 años, 3 meses Puntos: 0 | |
name + xhtml strict ?? Hola
Tengo un documento en xhtml strict y una galeria de fotos que funciona con un javascript:
<script type="text/javascript">
<!--
window.focus();
var currentThumb;
var w3c = false;
function ShowPicture(s, t)
{
document.mainPic.src = s;
if (w3c) {
document.getElementById(t).style.visibility='hidde n';
document.getElementById(currentThumb).style.visibi lity='visible';
}
currentThumb = t;
}
//-->
</script>
En el documento hay el siguente codigo xhtml:
<p>
<a onclick="ShowPicture('photos/01.jpg', 'photo 01');return false;" href="javascript:ShowPicture('photos/01.jpg','photo 01')"><img src="photos/01t.jpg" alt="photo 01"/></a>
.................................................. ..............................
<a onclick="ShowPicture('photos/08.jpg', 'photo 08');return false;" href="javascript:ShowPicture('photos/08.jpg','photo 08')"><img src="photos/08t.jpg" alt="photo 08"/></a>
</p>
<div id="mainimg"><img src="photos/01.jpg" alt="mainPic" name="mainPic" width="315" height="450"/></div>
Pues el xhtml Strict no permite usar etiqueta name dentro de img.
He intentado cambiarla por id, pero asi el javascript no funciona en IE
Algiuen sabe que puedo hacer? |