witam
mam problem z prostą galerią wszystko ładnie śmiga gdy skrypt jest umieszczony w kodzie strony, lecz gdy umieszczam go poprzez
<script type="text/javascript" src="files/gallery.js"></script>
pod IE wywala błąd i nie działa, podczas gdy pod firefox i opera działa prawidłowo
kod galerii
<script language="JavaScript"> var bannery = new Array(
"images/galeria/G01.jpg",
"images/galeria/G02.jpg",
"images/galeria/G06.jpg",
"images/galeria/G10.jpg",
"images/galeria/I04.jpg",
"images/galeria/I02.jpg",
"images/galeria/I03.jpg",
"images/galeria/G16.jpg",
"images/galeria/G17.jpg",
"images/galeria/G20.jpg",
"images/galeria/G25.jpg",
"images/galeria/l00.jpg",
"images/galeria/l000.jpg",
"images/galeria/l01.jpg",
"images/galeria/l04.jpg",
"images/galeria/l06.jpg",
"images/galeria/l07.jpg",
"images/galeria/l09.jpg");
// opisy obrazków
var opisy = new Array(
"4a",
"4b",
"Klasy trzecie",
"Zerówka",
"Kiermasz",
"Kiermasz",
"Kiermasz",
"Pasowanie na Platerkę",
"Pani M. Tuszyńska",
"Królewna Śnieżka",
"Królewna Śnieżka",
"Zerówka",
"Zerówka",
"Polonez klasy 6a",
"Jasełka",
"Jasełka",
"Jasełka",
"Jasełka");
// -->
i wywołanie:
<script language="JavaScript"> <!--
var los = Math.floor(Math.random() * bannery.length)
document.write("<IMG SRC='"+bannery[los]+"' ALT='"+opisy[los]+"' ALIGN=left style='margin-left: 25px'>");
// -->
i właśnie w wywołąniu IE jakiś błąd znajduje w lini zaczynającej się od 'var'
pzdr