Hallo beim ersten aufrufen der funktion ppc() wird kein bild ausgegeben. Das unter stehende Script ist das was der Browser geladen hat. Was mache ich falsch das var i = 1 irgendwie nicht definiert also auf 1 gesetzt wird?
	
							
						
					PHP Code:
	
	
var i = 1
    images = new Array
    images[1] = "./upload/200705031930212.jpg"
    images[2] = "./upload/200705031930052.jpg"
    images[3] = "./upload/200705031930382.jpg"
    infotext = new Array
    infotext[1] = "asdfsxx"
    infotext[2] = "sad fsadf"
    infotext[3] = "asd asf"
function ppc(){
        i--;
    if (i < 1){
    i = 3;}
        document.grossbild.src = images[i];    
    var bildinformationen = document.getElementById("bildinformationen");    
bildinformationen.innerHTML = ""+infotext[i]+"";
}
function npc(){
      i++;
      if (i > 3) {
      i = 1; }
        document.grossbild.src = images[i];
    var bildinformationen = document.getElementById("bildinformationen");    
bildinformationen.innerHTML = ""+infotext[i]+"";
} 
          

Comment