asd4444b: Problem mit einem eigenem Pictureviewer

Beitrag lesen

Hallo,
ich probiere jetzt schon ewig rum, aber hab' keine Ahnung warum dieser Code nicht funktioniert:

  
var img;  
  
function loading_site () {  
img = 1;  
}  
  
function loading_img (imgname, imgtext, imgnumber) {  
document.getElementById("text").innerHTML = imgtext + "<a>&nbsp;&nbsp;</a><a href='javascript:loading_img_b()'><img border='0px' id='back' src='pixel.jpg'></a>&nbsp;<a href='javascript:loading_img_f()'><img id='forward' src='pixel.jpg' border='0px'></a>&nbsp;&nbsp;<a href='javascript:loading_img_close()'><img id='close' border='0px' src='pixel.jpg'></a>"  
document.getElementById("close").src = "close.png"  
document.getElementById("forward").src = "forward.png"  
document.getElementById("back").src = "back.png"  
document.getElementById("img").src = imgname  
document.getElementById("img").border = "1px"  
document.bgColor = "grey"  
img = imgnumber  
}  
  
function loading_img_close () {  
document.getElementById("close").src = "pixel.jpg"  
document.getElementById("img").src = "pixel.jpg"  
document.getElementById("forward").src = "pixel.jpg"  
document.getElementById("back").src = "pixel.jpg"  
document.getElementById("img").border = "0px"  
document.getElementById("text").firstChild.data = " "  
document.bgColor = "white"  
}  
  
function loading_img_f () {  
    if (img == 1) {  
      location.href = "javascript:loading_img('bild2.jpg', 'Tea-Time', '2')"  
    } else if (img == 2) {  
       location.href = "javascript:loading_img('bild3.jpg', '... beladen', '3')"  
    }  
}  
  
function loading_img_b () {  
   if (img == 3) {  
      location.href = "javascript:loading_img('bild2.jpg', 'Tea-Time', '2')"  
    } else if (img == 2) {  
       location.href = "javascript:loading_img('bild1.jpg', 'Wilde Szene', '1')"  
    }  
}

Danke im Vorraus!

asd4444b