Ver Mensaje Individual
  #13 (permalink)  
Antiguo 18/06/2013, 11:58
Avatar de jumago
jumago
 
Fecha de Ingreso: marzo-2009
Mensajes: 34
Antigüedad: 15 años, 1 mes
Puntos: 0
Respuesta: Poner Javascript en un lugar deseado de la página

Ahora mismo tengo el externo.js en la misma carpeta de la página:

<script languaje="JavaScript">
function CAL(MIID)
{
mesarray=new Array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio","Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre");
diaarray=new Array( "Domingo","Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado");
hoy = new Date();
dias = hoy.getDate();
dia = hoy.getDay();
mes = hoy.getMonth();
mes=mesarray[mes];
dia =diaarray[dia];
anno = hoy.getYear();
if (anno <200)
anno = anno+1900;
var MITABLA='<CENTER>';
MITABLA+='<FONT SIZE="2" COLOR="#000000">'+dia+'</FONT><br>';
MITABLA+='<FONT SIZE="4" COLOR="#000000" FACE="Arial"><B>'+dias+'</B></FONT><br>';
MITABLA+='<FONT SIZE="2" COLOR="#000000"> <B>'+mes+'</B></FONT><br>';
MITABLA+='<FONT SIZE="2" COLOR="#000000">'+anno+'</FONT>';
MITABLA+='</CENTER>';
document.getElementById(MIID).innerHTML=MITABLA;
}
</script>



Luego tengo entre las etiquetas <head></head> esto otro:

<script src="externo.js" language="javascript" type="text/javascript"></script>

Y por último entre las etiquetas <body></body> tengo esto otro:

<td id="mical"></td>

Por más vueltas que le he dado no consigo encontrar el error.