View Full Version : problem!!!


fredy26
04-14-2003, 09:06 PM
If i have this in my head tag:

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
var theImages = new Array()

theImages[0] = '0.jpg'
theImages[1] = '1.jpg'
theImages[2] = '2.jpg'
theImages[3] = '3.jpg'
theImages[4] = '4.jpg'
theImages[5] = '5.jpg'
theImages[6] = '6.jpg'
theImages[7] = '7.jpg'
theImages[8] = '8.jpg'
theImages[9] = '9.jpg'
theImages[10] = '10.jpg'
theImages[11] = '11.jpg'
theImages[12] = '12.jpg'

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}

// End -->
</script>




and this in my body tag:


<SCRIPT LANGUAGE="JavaScript">


<!-- Begin
showImage();
// End -->
</script>

How do i make the images smaller because they appear giant even if i use a table and make the table really small.
The code above is used by me to randomly generate images every time you refresh.

SSPrincess
04-14-2003, 09:40 PM
Trying putting height & width after the img url with the size you want. Otherwise try using a paint program on your computer to make them smaller or make the picture into a thumbnail. Lissa shows you how to make a thumbnail here (http://www.lissaexplains.com/fun5.shtml#thumbnails).