Tengo una función javascript tal como esta:
Código:
donde actual = 0;function iniciar()
{
open(videosarray[actual],"visor");
open(explicacionarray[actual], "explicacion");
document.getElementById('izquierda').style.backgroundImage = "url(portadasarray[actual])";
document.getElementById('centro').style.backgroundColor = '#000000';
document.getElementById('derecha').style.backgroundColor = '#000000';
}
y donde portadasarray[0] tiene el valor = portadas/video1.jpg
Haciendolo de esta manera no me carga la imagen de fondo. Sin embargo si yo la imagen se la indico directamente tal como así:
Código:
Entonces si que carga la imagen de fondo.function iniciar()
{
open(videosarray[actual],"visor");
open(explicacionarray[actual], "explicacion");
document.getElementById('izquierda').style.backgroundImage = "url(portadas/video1.jpg)";
document.getElementById('centro').style.backgroundColor = '#000000';
document.getElementById('derecha').style.backgroundColor = '#000000';
}
Me gustaria me pudieran ayudar para resolver por que no funciona usando el array. Muchas grácias!!!




