Ver Mensaje Individual
  #3 (permalink)  
Antiguo 26/01/2012, 16:05
yagoo_15
 
Fecha de Ingreso: enero-2012
Mensajes: 2
Antigüedad: 12 años, 3 meses
Puntos: 0
Respuesta: error 'is not defined' en firefox

Gracias por tu respuesta. La verdad es todo un codigo php que inserta este javacript en un html. Los valores al parecer son obtenidos de una base de datos, te muestro el codigo:

<?php

// START JAVA
// window.open('data/' + photos[target] + '.jpg', 'photo', 'height=500,width=600');

$BODYTAG .= ",ReloadImages()";
$SRC .= "
<script language='javascript' type='text/javascript'>
//photos


function LoadPhotoPage(id) {
target= curphoto + id ;
document.location = 'details.php?id=' + photos[target];
}

function LoadPhotoWindow(id) {
target = curphoto + id;
window.open('imgwr.php?id=' + photos[target] + '','photo','height=500,width=600');
}


function SetLargeImage(id) {
target = curphoto + id;
if (target > cphotos) {
// bim.src = 'images/blankwhite.jpg';
} else {
bim.src = 'imgwr.php?square=1&id=' + photos[target] + '&dim=300x300&flood=FFFFFF';
}
}

function NextPhotos() {
if (curphoto+7 <= cphotos) {
curphoto=curphoto+7;
LoadPhotos();
}
}

function PrevPhotos() {
if (curphoto-7 >= 1) {
curphoto = curphoto-7;
LoadPhotos();
}
}


function ReloadImages() {
LoadPhotos();
LoadRenders();
}

function LoadPhotos() {
if ((curphoto) < cphotos) {
img0.src = 'images/blankwhite.jpg';
} else { img0.src = 'imgwr.php?square=1&id=' + photos[curphoto] + '&dim=100x100&flood=FFFFFF' }

if ((curphoto + 1) > cphotos) {
img1.src = 'images/blankwhite.jpg';
} else { img1.src = 'imgwr.php?square=1&id=' + photos[curphoto+1] + '&dim=100x100&flood=FFFFFF' }

if ((curphoto + 2) > cphotos) {
img2.src = 'images/blankwhite.jpg';
} else { img2.src = 'imgwr.php?square=1&id=' + photos[curphoto+2] + '&dim=100x100&flood=FFFFFF' }

if ((curphoto + 3) > cphotos) {
img3.src = 'images/blankwhite.jpg';
} else { img3.src = 'imgwr.php?square=1&id=' + photos[curphoto+3] + '&dim=100x100&flood=FFFFFF' }

if ((curphoto + 4) > cphotos) {
img4.src = 'images/blankwhite.jpg';
} else { img4.src = 'imgwr.php?square=1&id=' + photos[curphoto+4] + '&dim=100x100&flood=FFFFFF' }

if ((curphoto + 5) > cphotos) {
img5.src = 'images/blankwhite.jpg';
} else { img5.src = 'imgwr.php?square=1&id=' + photos[curphoto+5] + '&dim=100x100&flood=FFFFFF' }

if ((curphoto + 6) > cphotos) {
img6.src = 'images/blankwhite.jpg';
} else { img6.src = 'imgwr.php?square=1&id=' + photos[curphoto+6] + '&dim=100x100&flood=FFFFFF' }
}


var photos = new Array()
";

$a=0;
$aah = mysql_query("SELECT * FROM GALLERY WHERE websiteid='$SITEID' AND type=2 AND category='$row[4]' ORDER BY sortid");
while ($aar = mysql_fetch_array($aah)) {
$a++;
$SRC .= "photos[$a] = $aar[0]
";
}

$SRC .= "
cphotos = $a

curphoto = 1;
</script>
";

?>

Como te comento no sé mucho de programacion JavaScript. Asi que te agradezco si me das una pista de que puede andar mal.