Nieprawidłowy argument Wiersz: 6 Znak: 1
Oto skrypt:
function img(width,height,file){ document.getElementById('photo2').className='alt3'; document.getElementById('photo').style.left=window.innerWidth/2; document.getElementById('photo').style.top=window.innerHeight/2; document.getElementById('photo').style.width=60; document.getElementById('photo').style.height=60; document.getElementById('photo').className='alt4'; document.getElementById('photo3').style.width='100%'; document.getElementById('photo3').style.height='100%'; document.getElementById('photo3').className='alt4'; document.getElementById('photo4').style.width='100%'; document.getElementById('photo4').style.height='100%'; document.getElementById('photo4').className='alt4'; var max_width=window.innerWidth-60; var max_height=window.innerHeight-60; var new_width=width; var new_height=height; var scale=1; var scale_1=max_height/height; var scale_2=max_width/width; if(scale_1<scale_2){scale=scale_1;} else{scale=scale_2;} if(scale<1){ new_width = width * scale; new_height = height * scale; } img2(new_width+30,new_height+30,0,0,''+file+''); } function img2(width,height,a,b,file){ a++; if(a<10){setTimeout("img2("+width+","+height+","+a+","+b+",'"+file+"')",50);} document.getElementById('photo').style.width=(a/10)*width; document.getElementById('photo').style.left=(window.innerWidth/2)-((a/10)*(width/2)); if(a==10){img3(width,height,a,b,file);} } function img3(width,height,a,b,file){ b++; if(b<10){setTimeout("img3("+width+","+height+","+a+","+b+",'"+file+"')",50);} document.getElementById('photo').style.height=(b/10)*height; document.getElementById('photo').style.top=(window.innerHeight/2)-((b/10)*(height/2)); if(b==10){img4(''+file+'',width,height);} } function img4(msg,width,height){ document.getElementById('photo2').style.height=height; document.getElementById('photo2').style.top=(window.innerHeight/2)-(height/2); document.getElementById('photo2').style.width=width; document.getElementById('photo2').style.left=(window.innerWidth/2)-(width/2); document.getElementById('photo2').innerHTML='<IMG SRC=''+msg+'\' STYLE="MARGIN-TOP:15px;WIDTH:'+(width-30)+'px;HEIGHT:'+(height-30)+'px;" onLoad="img5();" onClick="hide();">'; } function img5(){ document.getElementById('photo2').className='alt4'; } function hide(){ document.getElementById('photo2').className='alt3'; document.getElementById('photo').className='alt3'; document.getElementById('photo3').className='alt3'; document.getElementById('photo4').className='alt3'; }
Zadaniem powyższego skryptu jest wyświetlenie animowanej tablicy (rozszeżającej się od środka wzdłuż a potem w szerz) i wstawienie na niej zdjęcia.
Dla osób ciekawych jak to powinno wyglądać i nających Firefox zapraszam...
http://fnxnet.domenomania.pl/87dpg/index.p...&photo_id=6
Jeśli ktoś wie gdzie jest błąd proszę o pomoc.