Help with phantom space.
var imagenumber = 5 ;
var randomnumber = Math.random() ;
var rand1 = Math.round( (imagenumber-1) * randomnumber) + 1 ;
var URLs = new Array() ;
images = new Array
images = "images/headerpics/h1.jpg"
images = "images/headerpics/h2.jpg"
images = "images/headerpics/h3.jpg"
images = "images/headerpics/h4.jpg"
images = "images/headerpics/h5.jpg"
var image = images[rand1] ;
var linknumber = 1 ;
var img1 = Math.round( (linknumber-1) * randomnumber) + 1 ;
links = new Array
links = "index.htm"
var link = links[img1];
document.write('<a href="' + link + '"><img src="' + image + '" border="0"></a>') ;
Here is the html code to call the script,
<!-- START ROTATING HEADER GRAPHICS -->
<!-- END ROTATING HEADER GRAPHICS -->
I have a table created with two rows with a menu bar in the bottom row and the images load in the top row. If I just place an image in the top row it looks fine. If I use the script to randomly load the images there is a small space under the image or between the top row and bottom row.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)