Ver Mensaje Individual
  #13 (permalink)  
Antiguo 11/10/2005, 14:44
Avatar de programeitor
programeitor
 
Fecha de Ingreso: febrero-2005
Mensajes: 994
Antigüedad: 19 años, 3 meses
Puntos: 9
Hola, he puesto todo el codigo junto el html y el archivo js screenshost.js, el archivo css styles.css al que se hace referencia en la funcion openWin no lo he encontrado, seguramente le de una presentacion a la imagen en el popup.

Tanto las imagenes como el css si lo tienes tienen que estar en el mismo directorio que este html.

Tenia varios fallos importantes, que he reparado, todavia admite mas depuracion, pero eso ya te lo voy a dejar a ti.

<html>
<HEAD>
<script>
var imagenes = [
"inter981_1.jpg",
"inter981_2.jpg",
"inter981_3.jpg",
"inter981_4.jpg",
"inter981_5.jpg"
];
function aleatorio() {
i_jn=Math.floor (imagenes.length * Math.random())+1
document.images.imagen.src = "inter981_"+i_jn+".jpg";
status=i_jn
}
function openWin(fileToOpen,nameOfWindow,width,height) {
myWindow = window.open("",nameOfWindow,"menubar=no,scrollbars =no,status=no,width="+width+",height="+height);
myWindow.document.open();
myWindow.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">\n')
myWindow.document.write('<html><head><title>Screen Shot Viewer</title><link rel="stylesheet" href="styles.css" type="text/css"></head>')
myWindow.document.write('<body><a href="javascript:self.close();"><img src="'+ fileToOpen +'"></a></body></html>');
myWindow.document.close();
status=i_jn
}
function scrshot_jn(x,n) {
i_jn += n;
if (i_jn > x) i_jn = 1;
if (i_jn < 1) i_jn = x;
document.images.imagen.src = "inter981_" + i_jn + ".jpg";
status=i_jn
}
</script>
<STYLE type="text/css">
A:active {
FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Tahoma; TEXT-DECORATION: none
}
A:visited {
FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Tahoma; TEXT-DECORATION: none
}
A:hover {
FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: orange; FONT-FAMILY: Tahoma; TEXT-DECORATION: none
}
.credits {
FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Tahoma
}
.textonormal {
FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Tahoma
}
.textonormalnegrita {
FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Tahoma
}
A:link {
FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Tahoma; TEXT-DECORATION: none
}
</STYLE>
</HEAD>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"body onload="aleatorio()">
<div align="center">
<table border="0" width="780">
<tr>
<td align="center" valign="top">
<table class=profilestuff border=0 cellspacing=20>
<tr>
<td valign=top style="padding-top:3px;">
<td>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td colspan="3">
<!-- We use a height of 483 instead of 480 to workaround something which
appears to be a bug in Mozilla? -->
<a href="javascript:openWin('inter981_'+i_jn+'.jpg',' scummvm',640,483);"
onMouseOver="window.status='Click para ver a tamaño completo';return true;"
onMouseOut="window.status='';return true;"><img
name="imagen" width="171" height="373"
style="margin: 5px"
alt="Click para ver a Tamaño completo"></a>
</td></tr>
<tr>
<td align=left>
<a href="javascript:scrshot_jn(imagenes.length,-1);"><< Anterior</a>
<!-- Entre paréntesis va el número de fotos totales y una a restar (para ir a la prévia) -->
</td>
<td></td>
<td align=right>
<a href="javascript:scrshot_jn(imagenes.length,+1);"> Siguiente >></a>
<!-- Entre paréntesis va el número de fotos totales y una a sumar (para ir a la siguiente) -->
</td>
</tr>
</table>
</td>
<br></td>
<td valign=top class="textonormal" align="left">
<table border=0 class=MDStuff width="442">
<tr><td colspan=2 style='font-size:150%;'>
<b><font size="5" color="#C0C0C0">inter981</font></b></td></tr><tr>
<td class=textonormalnegrita nowrap width="88" align="left" valign="top">
<font size="2" color="#C0C0C0">Nombre: </font> </td>
<td class=textonormal width="348">
<font size="2">Alejandro C.
L.</font></td></tr><tr>
<td class=textonormalnegrita nowrap width="88" align="left" valign="top">
<font size="2" color="#C0C0C0">Edad: </font> </td>
<td class=textonormal width="348"><font size="2">29</font></td></tr><tr>
<td class=textonormalnegrita nowrap width="88" align="left" valign="top">
<font size="2" color="#C0C0C0">Sexo: </font> </td>
<td class=textonormal width="348">
<font size="2">Varón</font></td></tr><tr>
<td class=textonormalnegrita nowrap width="88" align="left" valign="top">
<font size="2" color="#C0C0C0">Estado civil: </font> </td>
<td class=textonormal width="348">
<font size="2">¿pseudo-casado? </font> </td></tr><tr>
<td class=textonormalnegrita nowrap width="88" align="left" valign="top">
<font size="2" color="#C0C0C0">Ubicación: </font> </td>
<td class=textonormal width="348"><font size="2">La Coruña, España</font></td></tr><tr>
<td class=textonormalnegrita nowrap width="88" align="left" valign="top">
<font size="2" color="#C0C0C0">Ocupación: </font> </td>
<td class=textonormal width="348"><font size="2">Diseñador gráfico</font></td></tr><tr>
<td class=textonormalnegrita nowrap width="88" align="left" valign="top">
<font size="2" color="#C0C0C0">Aficiones: </font> </td>
<td class=textonormal width="348">
<font size="2">De todo un poquillo</font></td></tr>
</table>
</td>
</tr>
</table>
<p>&nbsp;</p>

</td>
</tr>
</table>
</div>
</body>
</html>

Última edición por programeitor; 11/10/2005 a las 14:56