here's my code
Code:<script language="javascript"> var ImageList; var pos=0; ImageList = new Array(); ImageList[0] = new Image(41,20); ImageList[0].src = '../images/headers/homes.gif'; ImageList[1] = new Image(41,20); ImageList[1].src = '../images/headers/over/homes.gif'; ImageList[2] = new Image(37,20); ImageList[2].src = '../images/headers/decks.gif'; ImageList[3] = new Image(37,20); ImageList[3].src = '../images/headers/over/decks.gif'; ImageList[4] = new Image(45,20); ImageList[4].src = '../images/headers/interiors.gif'; ImageList[5] = new Image(45,20); ImageList[5].src = '../images/headers/over/interiors.gif'; ImageList[6] = new Image(100,20); ImageList[6].src = '../images/headers/more.gif'; ImageList[7] = new Image(100,20); ImageList[7].src = '../images/headers/over/more.gif'; function changeIMG(){ if (navigator.appName == 'Netscape'){ //document.images["thePic"] = new Image(100,100); document.images["thePic"].src=ImageList[pos].src; document.images["thePic"].width = ImageList[pos].width; document.images["thePic"].height= ImageList[pos].height; }else{ document.thePic.src=ImageList[pos].src; document.thePic.width=ImageList[pos].width; document.thePic.height=ImageList[pos].height; } } </script> it works in explorer(of course) but netscape gives me trouble: it takes the size of the default image in the img tag! if i change image, the images changes but not the size!! does some1 know how to get around this!!




Reply With Quote