Error con javascript

Error con javascript

de Alexander Osorio Bermudez -
Número de respuestas: 2

Buen dia moodlers

Para que mi moodle fuera mas interactivo cree unos script en javascript pero al montarlos sobre moodle presentan errores. el error especifico es:

Line: 30

Char:15;

Error: Expected ';'

code:0

Sin embargo revisé la línea indicada no he encontrado y finaliza con ";". Ejecuto la página en el explorador y no tengo ningún problema.

Agradezco su ayuda.

Promedio de valoraciones: -
En respuesta a Alexander Osorio Bermudez

Re: Error con javascript

de Israel Forés -
Hola Alexandre,

podrias mandar esa línea a ver si cuatro hojos veen mas que dos wink

Un saludo
Israel
En respuesta a Israel Forés

Re: Error con javascript

de Alexander Osorio Bermudez -

Hola Israel

Te envio el codigo completo con la linea de error resaltada en verde, sin embargo creo que el problema esta en moodle pues lo he ejcutado directamente sobre el explorador y corre perfectamente. Estoy usando la version 1.6 pero tambirn lo probe en la 1.5. Gracias por la ayuda.

<html>
<head>
<title></title>
</head>
<body
background="IMAGENES/FONDOVIDEOS.JPG">
<br>
<div><table
width="800" height="386" border="0" summary=
"">
<tr>
<tr>
<td
width="610">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<iframe id= "CurrentImage" src="videos/video1.html" scrolling="no" marginwidth="0" marginheight="0" frameborder="No" width="400" height="300">
</iframe></td>
<td
width="30">&nbsp;
</td>
<td
width="200"><table width="200" border="0" summary="">
<tr>
<td
height="1">&nbsp;
</td>
</tr>
<tr>
<td
height="30"><A href="javascript:shiftImage(1);"><img src="IMAGENES/boton1.gif" border="0" width="200" height="30" alt=""></A
></td>
</tr>
<tr>
<td
height="30"><A href="javascript:shiftImage(2);"><img src="IMAGENES/boton2.gif" border="0" width="200" height="30" alt=""></A
></td>
</tr>
<tr>
<td
height="30"><A href="javascript:shiftImage(3);"><img src="IMAGENES/boton3.gif" border="0" width="200" height="30" alt=""></A></A
></td>
</tr>
<tr>
<td
height="30"><A href="javascript:shiftImage(4);"><img src="IMAGENES/boton4.gif" border="0" width="200" height="30" alt=""></A></A
></td>
</tr>
<tr>
<td
height="30"><A href="javascript:shiftImage(5);"><img src="IMAGENES/boton5.gif" border="0" width="200" height="30" alt=""></A></A
></td>
</tr>
<tr>
<td
height="30"><A href="javascript:shiftImage(6);"><img src="IMAGENES/boton6.gif" border="0" width="200" height="30" alt=""></A></A
></td>
</tr>

<tr>
<td
height="30"><A href="javascript:shiftImage(7);"><img src="IMAGENES/boton7.gif" border="0" width="200" height="30" alt=""></A
></td>
</tr>

<tr>
<td
height="30"><A href="javascript:shiftImage(8);"><img src="IMAGENES/boton8.gif" border="0" width="200" height="30" alt=""></A
></td>
</tr>

<tr>
<td height="30"><A href="javascript:shiftImage(9);"><img src="IMAGENES/boton9.gif" border="0" width="200" height="30" alt=""></A
></td>
</tr>
<tr>

<td height="30"><A href="javascript:shiftImage(10);"><img src="IMAGENES/boton10.gif" border="0" width="200" height="30" alt=""></A
></td>
</tr>
</table></td>
</tr>
</table>

</div>
<SCRIPT>

var $ = function(id) {return document.getElementById(id) || null;}
var shiftImage = function(sid) {
$('CurrentImage').src = "videos/video"+sid+".html";
}
</SCRIPT>
</body>
</html>